Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-30 Thread Jouni K . Seppänen
Jae-Joon Lee writes: > I don't see such any error and I'm not sure if the error is related > with my patch since the ps backend does not use dviread module. Darren didn't include the complete traceback, but it seems that dviread does get used by TexManager.get_text_width_height_descent unless th

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-30 Thread Jae-Joon Lee
On Thu, Apr 30, 2009 at 11:44 AM, Darren Dale wrote: > I have to make several attempts before the test script will run to > completion, I get errors like: > >   File "/usr/lib64/python2.6/site-packages/matplotlib/dviread.py", line 812, > in find_tex_file >     pipe = subprocess.Popen(cmd, stdout=s

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-30 Thread Darren Dale
I have to make several attempts before the test script will run to completion, I get errors like: File "/usr/lib64/python2.6/site-packages/matplotlib/dviread.py", line 812, in find_tex_file pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE) File "/usr/lib64/python2.6/subprocess.py", line

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Jae-Joon Lee
On Wed, Apr 29, 2009 at 4:07 PM, Ken Schutte wrote: > Yes, I'm sorry, I also spoke too soon.  I have found problems with > this patch - mainly things like it chopping off xlabel, titles, etc, > for some examples. > I'm not sure if these are related with my patch. Please show some example when you

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Jae-Joon Lee
Argg, attached a wrong patch. This one should work # set the paper size to the figure size if isEPSF. The # resulting ps file has the given size with correct bounding # box so that there is no need to call 'pstoeps' if isEPSF: paperWidth, paperHeigh

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Jae-Joon Lee
Thanks Darren, I believe that my patch only affects eps output with usetex=True, i.e., only those "tex_*.eps" files are affected. I found that my previous patch didn't treated the orientation of the paper correctly. So the bounding box of all the landscape eps outputs are incorrect. This can be e

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Ken Schutte
Yes, I'm sorry, I also spoke too soon. I have found problems with this patch - mainly things like it chopping off xlabel, titles, etc, for some examples. I have some major deadlines using this stuff right now, so I don't have time to experiment. But, eventually, I will try to take a look at what

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Darren Dale
The test file is attached this time. On Wed, Apr 29, 2009 at 3:55 PM, Darren Dale wrote: > Hi Jae-Joon, > > On Tue, Apr 28, 2009 at 3:49 PM, Jae-Joon Lee wrote: > >> This patch is now committed to the trunk (r7068). >> > > I think these changes have had unintended consequences. I attached a test

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-29 Thread Darren Dale
Hi Jae-Joon, On Tue, Apr 28, 2009 at 3:49 PM, Jae-Joon Lee wrote: > This patch is now committed to the trunk (r7068). > I think these changes have had unintended consequences. I attached a test file I used to inspect the results when I wrote the original code that you recently tried to improve.

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-28 Thread Jae-Joon Lee
This patch is now committed to the trunk (r7068). -JJ On Sat, Apr 25, 2009 at 8:29 AM, Ken Schutte wrote: > Yeah, that seems to work!  thanks a lot, > Ken > > On Fri, Apr 24, 2009 at 5:21 PM, Jae-Joon Lee wrote: >> ps backend, when usetex=True, uses latex with psfrag package to >> generate the

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-25 Thread Ken Schutte
Yeah, that seems to work! thanks a lot, Ken On Fri, Apr 24, 2009 at 5:21 PM, Jae-Joon Lee wrote: > ps backend, when usetex=True, uses latex with psfrag package to > generate the output (with some extra steps). > It seems that the bounding box information is not correctly recovered > during this

Re: [matplotlib-devel] Problem saving to eps with usetex=True

2009-04-24 Thread Jae-Joon Lee
ps backend, when usetex=True, uses latex with psfrag package to generate the output (with some extra steps). It seems that the bounding box information is not correctly recovered during this process. I first thought that it would be quite difficult to get this correct, however the attached (relativ

[matplotlib-devel] Problem saving to eps with usetex=True

2009-04-23 Thread Ken Schutte
I've been trying to track down some strange behavior I was getting, and I think narrowed it down to some code that I'll paste below. I'm trying to write to .eps files, and when I have usetex=True, something is screwed up with the padding on the left, and eventually the whole image is just white.