Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Plots in Maxima

Tags:

plot

maxima

I am writing a code in Maxima and I have three plots. I have no trouble plotting these individually but I can not figure out how to have them all on one plot with out doing it in one for loop, with out going into too much detail this would be difficult with my code.

    for i:1 step 1 while i<=n-1 do(figgdown[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[p[i],p[i]]]));
    for i:1 step 1 while i<=n-1 do(figgup[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[q[i], q[i]]]));
    for i:1 step 1 while i<=n-1 do(figgmiddle[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[pq[i], pq[i]]]));

Is there a way i can do something like the Show function in Mathematica, where the graphics appear together? Best, Ben

like image 303
user1558881 Avatar asked Oct 16 '25 19:10

user1558881


1 Answers

You can keep a list

n: 10;
x: makelist(2*%pi*i/n, i, 0, n);

p: [];
y1: sin(x);
p: endcons([discrete, x, y1], p);

y2: cos(x);
p: endcons([discrete, x, y2], p);

/* display all plots in p */
plot2d(p);
like image 55
slitvinov Avatar answered Oct 19 '25 14:10

slitvinov