问题
Maxima plotting in a loop, must shut one plot to see the next one. Iam working in windows environment, but in linux will the function plotted in one view.
For example this function :
for d:0.1 thru 1 step 0.1 do
draw2d(explicit(x^d,x,0,1));
I have also tried this:
set_plot_option(['plot_format, 'gnuplot_pipes]);
But this didnt solve it. Is there an option, where i can set the plotting in one view?
Thank you.
回答1:
You could make a list of curves in the loop and plot them all on a single graph. You can use a loop or makelist to build the curve list.
makelist(x^d, d, 0, 1, 0.1);
plot2d(%, [x, 0, 1]);
If you're using wxMaxima, you can the with_slider_draw function to animate the plot:
with_slider_draw(
d, /* the name of the variable to attach to the slider */
makelist(i,i,0,1,0.1), /* a list of values that the variable can have */
explicit(x^d, x, 0, 1) /* plot the function */
)$
If you prefer plot2d arguments, use with_slider to do the same thing:
with_slider(
d,
makelist(i,i,0.1,1,0.1),
[x^d], [x,0,1]
);
Click on the graph and then use the Play button on the toolbar to play the animation. You can use the slider on the toolbar or your mouse wheel to move back and forth between animation frames. You can even save the animation as an animated gif by right-clicking the plot and choosing Save Animation.
来源:https://stackoverflow.com/questions/27567331/maxima-plotting-in-a-loop-must-shut-one-plot-to-see-the-next-one