File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,22 @@ int main()
15
15
z.push_back (log (i));
16
16
17
17
if (i % 10 == 0 ) {
18
- // Clear previous plot
19
- plt::clf ();
20
- // Plot line from given x and y data. Color is selected automatically.
21
- plt::plot (x, y);
22
- // Plot a line whose name will show up as "log(x)" in the legend.
23
- plt::named_plot (" log(x)" , x, z);
18
+ // Clear previous plot
19
+ plt::clf ();
20
+ // Plot line from given x and y data. Color is selected automatically.
21
+ plt::plot (x, y);
22
+ // Plot a line whose name will show up as "log(x)" in the legend.
23
+ plt::named_plot (" log(x)" , x, z);
24
24
25
- // Set x-axis to interval [0,1000000]
26
- plt::xlim (0 , 1000 * 1000 );
25
+ // Set x-axis to interval [0,1000000]
26
+ plt::xlim (0 , n*n );
27
27
28
- // Add graph title
29
- plt::title (" Sample figure" );
30
- // Enable legend.
31
- plt::legend ();
32
- // Display plot
33
- plt::pause (0.1 );
28
+ // Add graph title
29
+ plt::title (" Sample figure" );
30
+ // Enable legend.
31
+ plt::legend ();
32
+ // Display plot continuously
33
+ plt::pause (0.1 );
34
34
}
35
35
}
36
36
}
You can’t perform that action at this time.
0 commit comments