public static Chart getMSDLineChart ( Trajectory t , int lagMin , int lagMax , AbstractMeanSquaredDisplacmentEvaluator msdeval ) { double [ ] xData = new double [ lagMax - lagMin + 1 ] ; double [ ] yData = new double [ lagMax - lagMin + 1 ] ; msdeval . setTrajectory ( t ) ; msdeval . setTimelag ( lagMin ) ; for ( int i = lagMin ; i < lagMax + 1 ; i ++ ) { msdeval . setTimelag ( i ) ; double msdhelp = msdeval . evaluate ( ) [ 0 ] ; xData [ i - lagMin ] = i ; yData [ i - lagMin ] = msdhelp ; } // Create Chart Chart chart = QuickChart . getChart ( "MSD Line" , "LAG" , "MSD" , "MSD" , xData , yData ) ; // Show it //new SwingWrapper(chart).displayChart(); return chart ; }
Plots the MSD curve for trajectory t