Dear (newbie like myself) XP or more specific win32 users,
The problem was not with the 'dvips' command, but with the 'latex'
command in version 0.83.2.
After changing the line 1086 in backend_ps.py 0.83.2 to read:
command = 'latex -interaction=nonstopmode "%s"' % texfile
as in mpl version 0.84, instead of:
command = "latex -interaction=nonstopmode '%s'" % texfile
my epsfile created with 'savefig(epsfile)' looks great...
In mpl v0.84 line 1102 (unfortunately) still reads:
command = 'gs -dBATCH -dNOPAUSE -dSAFER -r%d \
in stead of:
command = 'gswin32c -dBATCH -dNOPAUSE -dSAFER -r%d \
This could easily be updated to:
if sys.platform == 'win32':
command = 'gswin32c -dBATCH -dNOPAUSE -dSAFER -r%d \
-sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \
-sOutputFile="%s" "%s"'% (dpi, epsfile, psfile)
else:
command = 'gs -dBATCH -dNOPAUSE -dSAFER -r%d \
-sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \
-sOutputFile="%s" "%s"'% (dpi, epsfile, psfile)
in future versions of mpl...
Unfortunately I still have a problem with the text display in WXAgg (or
TkAgg) "windows"...
This does not worry me to much, because WX* mpl "windows" is rather
slow...
Using GSView on each EPS I'm interested in suffice all my needs, as it
is the quality of the *.eps I'm interessted in...
Any ideas on how to fix the WXAgg problem however, would still be
apreciated...
(dvipng is version 1.6)
Kind regards,
Peter-Jan Randewijk
Senior Lecturer - Power Electronics & Drives
-oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo-
Dep. E & E Engineering - E314
Stellenbosch University
Private Bag X1
Matieland, 7603
South Africa
Tel: +27 (0) 21 808 4457 (w)
Fax: +27 (0) 21 808 3951 (w)
Tel: +27 (0) 21 883 8592 (h)
Cell: +27 (0) 83 556 5809 (h)
eMail: pjrandew@...841... (w)
-oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo-
···
-----Original Message-----
From: Gary [mailto:pajer@…97…]
Sent: 17 October 2005 15:06
To: Randewijk P-J, Mnr <pjrandew@...841...>
Subject: Re: [Matplotlib-users] savefig(epsfilename) Bug on XP
Sorry to be terse ... I'm late ...
but I think this problem has come up before, and I think it has been
solved
try searching the archives for the thread: "problem using tex on axes
label"
I'm not sure that's the right thread... If I find any more info, I'll
send it along.
-gary
P.S. After solving a few problems, mpl and MikTeX have been working
together wonderfully for me. Search the archives creatively.
Randewijk P-J, Mnr <pjrandew@...841...> wrote:
Dear matplotlib XP users,
I am battling with matplotlib and LaTeX for text handeling.
I am running Windows XP, python 2.3.5, matplotlib-0.83.2. ... and
MiKTeX...With the WXAgg backend I don't see any text at all in any window,
with:text.usetex : True
In my matplotlibrc file...
With PS backend with no show() line and a savefig(epsfilename) line, I
got the following error:...
IOError: [Errno 2] No such file or directory:
'890ab9460a8ecc8327114aa4d5689212.eps'I changed line 1097 in backend_ps.py to read:
command = 'gswin32c -dBATCH -dNOPAUSE -dSAFER -r%d \
instead of:
command = 'gs -dBATCH -dNOPAUSE -dSAFER -r%d \
Now at leas it writes the eps file, but GSView gives the following
error:Unrecoverable error: configurationerror in setpagedevice Operand
stack:
false --nostringval--
Failed to open device or install ViewerPreProcess hook: returns -26I then tried to see if savefig(psfilename) would work, but now I get
the error:IOError: [Errno 2] No such file or directory:
'5cdf9668d6b377717ccafe1ddfbafb10.ps'Probable indicating an error with the 'dvips' command... ?
Any ideas on what to do... I'll leave it till Monday morning...
Kind regards and enjoy the weekend
Peter-Jan Randewijk
Senior Lektor - Drywingselektronika & Elektriese Aandrywing-oOOOOOOOOOOOOOOOOOOOOOOOOOOo-
Departement E&E. Ingenieurswese - E313
Universiteit Stellenbosch
Privaatsak X1
Matieland, 7603
Suid-Afrika
Tel: +27 (0) 21 808 4457 (w)
Faks: +27 (0) 21 808 3951 (w)
Tel: +27 (0) 21 883 8592 (h)
Sel: +27 (0) 83 556 5809 (h)
Epos: pjrandew@...841... (w)
-oOOOOOOOOOOOOOOOOOOOOOOOOOOo-