Postscript ouput on OS X problem.

Hiya, i'm having a problem getting a valid postscript file produced on OS X.

Using the example subplot_demo.py, modified to include the line:

    savefig('subplot_demo')

in the place of the show() command, and running it using:

    python subplot_demo.py -dPS

Produces the .ps file (available here for reference:
http://www.irbdavid.com/misc/subplot_demo.ps ), which can't be opened
by Preview on os x - says its can't convert it to PDF & cant open the
file. Checked the permissions etc on the file and they're fine.

Its pretty much a default installation of matplotlib etc, and output
displays fine on screen, using the wxPython / wxAgg thing (I think
that's what i mean :smiley: )

Any suggestions?

Regards,

Dave

Dave,

I had the same problem as you. Here is a solution...

Try editing your matplotlib rc file and change these font preferences

   font.serif : New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Bitstream Vera Serif, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
   font.sans-serif : Lucida Grande, Verdana, Geneva, Lucida, Bitstream Vera Sans, Arial, Helvetica, Avant Garde, sans-serif
   font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive
   font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy
   font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace

by moving the bitstream fonts to the front.

Next, you have to use LaTeX for all the 'text' you include in your plot. Add rc('text', usetex=True) at the begining of your Python script or modify your matplotlibrc file.

Everything is working fine after that.

Regards.

Benoit

David Andrews a écrit :

···

Hiya, i'm having a problem getting a valid postscript file produced on OS X.

Using the example subplot_demo.py, modified to include the line:

    savefig('subplot_demo')

in the place of the show() command, and running it using:

    python subplot_demo.py -dPS

Produces the .ps file (available here for reference:
http://www.irbdavid.com/misc/subplot_demo.ps ), which can't be opened
by Preview on os x - says its can't convert it to PDF & cant open the
file. Checked the permissions etc on the file and they're fine.

Its pretty much a default installation of matplotlib etc, and output
displays fine on screen, using the wxPython / wxAgg thing (I think
that's what i mean :smiley: )

Any suggestions?

Regards,

Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Benoit Donnet
Universite Catholique de Louvain
Facultes des Sciences Appliquees - Departement d'Ingenierie Informatique (INGI)
Place Sainte Barbe, 1
1348 Louvain-la-Neuve
phone: +32 10 47 87 18
home page: http://rp.lip6.fr/~donnet
traceroute@...210... website: http://trhome.sourceforge.net