In section 8 of the manual on plotting I found
Examples:
Saves a plot of sin(x) to the file sin.eps.
(%i1) plot2d (sin(x), [x, 0, 2*%pi], [gnuplot_term, ps],
[gnuplot_out_file, "sin.eps"])$
However, I find openmath easier, and in most cases, adequate.
(%i1) plot2d(sin(x), [x,0,6], [plot_format, openmath]);
This opens up a window with the plot, and the contents can be saved to
a ps file.
Of course, gnuplot has many more options for control of the displayed
output.
HTH,
-sen
On Thu, 5 Jul 2007, Richard Fateman wrote:
>
> I would like to take a plot from maxima and insert it into a LaTeX file.
>
> I found a command plot2d_ps that might be useful, but the documentation says
> it puts postscript into a stream "pstream". But how do I specify the name
> of pstream? Backing up in the documentation I see the there is a plot2d
> example with "sin.eps". But it neglects to say that closeps() is needed. It
> also seems that plot2d_ps is quite unnecessary, and is equivalent to
> inserting the option [gnuplot_term,ps].
>
> I gather that one also needs to do, and that plot2d_ps doesn't do this; one
> must do
>
> set_plot_option([gnuplot_out_file, "c:\\foo.eps"])
>
>
> ...
> For setting a plot option, I did not spot a place where this exact syntax is
> shown.
>
> It seems that
>
> plot_options[gnuplot_out_file]: "c:\\foo.eps" ;
>
> Would be simpler, to explain, though perhaps trickier to implement without
> re-doing the interface somewhat.
>
> RJF
>
> PS, I eventually got it to work.
>
>
>
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
--
---------------------------------------------------------------------------
| Sheldon E. Newhouse | e-mail: sen1 at math.msu.edu |
| Mathematics Department | |
| Michigan State University | telephone: 517-355-9684 |
| E. Lansing, MI 48824-1027 USA | FAX: 517-432-1562 |
---------------------------------------------------------------------------