Question: make a proc display a plot

hi.

this is my procedure, i think its obvious what its supposed to do, but it doesnt.

 

#plot p to file filename with size width cm x height cm

> makeeps := proc(p, filename, width, height);

>   plotsetup(eps, plotoutput=filename,  

>   plotoptions="portrait,noborder,color,leftmargin=0,bottommargin=0,width="||width||"cm,height="||height||"cm");

>   display(p);

>   plotsetup(default); 

> end:

 

i experimented a bit:

 

> test := proc(p);

>   display(p);

> end:

 

shows the plot. whereas

 

> test 2:= proc(p);

>   display(p);

>   3; 

> end:

 

does not show the plot. and indeed, my original proc works if i remove the last line, but that changes the proc of course. i want to reset the values at the end.

 

any ideas? sometimes i wonder how weird maple behaves sometimes. it gives me the feeling of it being a very old program.

 

regards,

peter

 

Please Wait...