Export plot result as pdf with "readable" text?



On May 13, Mario Rodriguez wrote:
-------------------------
Have you tried to use the terminal option? Both functions draw and plot 
can tell Gnuplot to generate the graph in pdf or eps format.

See, for example, the documentation for terminal:

? terminal

But I don't know if what you get is what you want.

--
Mario
-----------------------------------
As well as the terminal option in draw,
there is the gnuplot_term option in plot2d.

If we accept the default filename output
maxplot.ext (with ext = png, jpeg, svg, pdf, etc)
then the option item
[gnuplot_term, ext] yields the corresponding
file for the produced figure.

for example, working in windows xp with
xmaxima:

Maxima 5.24.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
                                  2011-05-13


(%i1) plot2d( [u^2, u^3],[u,0,2], [x, -.2, 2.5],
        [style, [lines,8,5],[lines,8,2]],
          [y,-1,4] , 
          [gnuplot_term,png] )$

  produced maxplot.png
  
  
  
(%i2) plot2d( [u^2, u^3],[u,0,2], [x, -.2, 2.5],
        [style, [lines,8,5],[lines,8,2]],
          [y,-1,4] , 
          [gnuplot_term,jpeg] )$

  produced maxplot.jpeg
  
(%i3) plot2d( [u^2, u^3],[u,0,2], [x, -.2, 2.5],
        [style, [lines,8,5],[lines,8,2]],
          [y,-1,4] , 
          [gnuplot_term,svg] )$                   

produced maxplot.svg
Can open this with inkscape.




(%i4) plot2d( [u^2, u^3],[u,0,2], [x, -.2, 2.5],
        [style, [lines,8,5],[lines,8,2]],
          [y,-1,4] , 
          [gnuplot_term,pdf] )$

this last produced maxplot.pdf with the correct curves
 BUT  labels and legends were altered as follows:
  u --> greek l.c. upsilon
  y --> greek l.c.  psi  
so I am not sure how the mutilation of labels and
legends is cured using a windows based system.

Note also, that you can specify the file name desired
by adding the option item (for example)

[gnuplot_out_file, "myname.png"]

or 
[gnuplot_out_file, "c:/work5/myname.png"]

etc.


Ted Woollett