The test file is attached this time.
On Wed, Apr 29, 2009 at 3:55 PM, Darren Dale <dsdal...@gmail.com> wrote:
> Hi Jae-Joon,
>
> On Tue, Apr 28, 2009 at 3:49 PM, Jae-Joon Lee <lee.j.j...@gmail.com>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. There are lots of combinations of large and small
> figures, with usetex and without, and with no distiller, gs distiller, of
> xpdf (pdftops) distiller. You have to visually inspect all of the ps/eps
> files that are generated. At one time, all of these files looked acceptable,
> but that was a couple years ago and I don't remember what version of
> ghostscript I was using at the time (I'm sure there is a record of it
> somewhere on this mailing list). WIth r7067, most of the files look fine, a
> few of the large files (large paper sizes) have problems. With r7068, quite
> a few examples have problems.
>
> Darren
>
>
>
>>
>>
>> On Sat, Apr 25, 2009 at 8:29 AM, Ken Schutte <kts.li...@gmail.com> wrote:
>> > Yeah, that seems to work! thanks a lot,
>> > Ken
>> >
>> > On Fri, Apr 24, 2009 at 5:21 PM, Jae-Joon Lee <lee.j.j...@gmail.com>
>> 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 process.
>> >> I first thought that it would be quite difficult to get this correct,
>> >> however the attached (relatively simple) patch seems to work fine.
>> >>
>> >> Ken, can you try the patch and see if it works?
>> >>
>> >> -JJ
>> >>
>> >>
>> >>
>> >>
>> >> On Thu, Apr 23, 2009 at 2:25 PM, Ken Schutte <kts.li...@gmail.com>
>> wrote:
>> >>> 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.
>> >>>
>> >>> If I run this script, the 'testA-*.eps' look good, but 'testB-*' does
>> >>> not. The same problem happens even if I remove the ticklabels.
>> >>>
>> >>> Any tips would be appreciated.
>> >>> thanks,
>> >>> Ken
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------
>> >>> import matplotlib.pyplot as plt
>> >>> import numpy as np
>> >>> from matplotlib import rc
>> >>>
>> >>> fig = plt.figure()
>> >>> ax = fig.add_axes([0,0,1,1],frameon=False)
>> >>>
>> >>> X = np.tile(np.arange(500),(10,1)) # (10,500) shape
>> >>>
>> >>> ax.imshow(X,interpolation='nearest',aspect='auto')
>> >>>
>> >>> def go(name):
>> >>>
>> >>> for d in (1,2,3,4):
>> >>>
>> >>> w = d*5
>> >>> h = d
>> >>>
>> >>> fig.set_size_inches(w,h)
>> >>> fig.savefig("%s-%d.eps" % (name,d))
>> >>>
>> >>> rc('text', usetex=False)
>> >>> go("testA")
>> >>>
>> >>> rc('text', usetex=True)
>> >>> go("testB")
>> >>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>> Crystal Reports - New Free Runtime and 30 Day Trial
>> >>> Check out the new simplified licensign option that enables unlimited
>> >>> royalty-free distribution of the report engine for externally
>> facing
>> >>> server and web deployment.
>> >>> http://p.sf.net/sfu/businessobjects
>> >>> _______________________________________________
>> >>> Matplotlib-devel mailing list
>> >>> Matplotlib-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>> >>>
>> >>
>> >
>>
>>
>> ------------------------------------------------------------------------------
>>
>
>
>
>
>> Register Now & Save for Velocity, the Web Performance & Operations
>> Conference from O'Reilly Media. Velocity features a full day of
>> expert-led, hands-on workshops and two days of sessions from industry
>> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>
>
from pylab import *
from matplotlib import rcParams
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = None
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('notex_nodist_pm.ps', orientation='portrait', papertype='letter')
savefig('notex_nodist_lm.ps', orientation='landscape', papertype='letter')
savefig('notex_nodist_pm.eps', orientation='portrait')
savefig('notex_nodist_lm.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('notex_gs_pm.ps', orientation='portrait', papertype='letter')
savefig('notex_gs_lm.ps', orientation='landscape', papertype='letter')
savefig('notex_gs_pm.eps', orientation='portrait')
savefig('notex_gs_lm.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('notex_xpdf_pm.ps', orientation='portrait', papertype='letter')
savefig('notex_xpdf_lm.ps', orientation='landscape', papertype='letter')
savefig('notex_xpdf_pm.eps', orientation='portrait')
savefig('notex_xpdf_lm.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = None
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('tex_nodist_pm.ps', orientation='portrait', papertype='letter')
savefig('tex_nodist_lm.ps', orientation='landscape', papertype='letter')
savefig('tex_nodist_pm.eps', orientation='portrait')
savefig('tex_nodist_lm.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('tex_gs_pm.ps', orientation='portrait', papertype='letter')
savefig('tex_gs_lm.ps', orientation='landscape', papertype='letter')
savefig('tex_gs_pm.eps', orientation='portrait')
savefig('tex_gs_lm.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(10,5))
plot([1,2,3,4])
savefig('tex_xpdf_pm.ps', orientation='portrait', papertype='letter')
savefig('tex_xpdf_lm.ps', orientation='landscape', papertype='letter')
savefig('tex_xpdf_pm.eps', orientation='portrait')
savefig('tex_xpdf_lm.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = None
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('notex_nodist_pl.ps', orientation='portrait', papertype='letter')
savefig('notex_nodist_ll.ps', orientation='landscape', papertype='letter')
savefig('notex_nodist_pl.eps', orientation='portrait')
savefig('notex_nodist_ll.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('notex_gs_pl.ps', orientation='portrait', papertype='letter')
savefig('notex_gs_ll.ps', orientation='landscape', papertype='letter')
savefig('notex_gs_pl.eps', orientation='portrait')
savefig('notex_gs_ll.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('notex_xpdf_pl.ps', orientation='portrait', papertype='letter')
savefig('notex_xpdf_ll.ps', orientation='landscape', papertype='letter')
savefig('notex_xpdf_pl.eps', orientation='portrait')
savefig('notex_xpdf_ll.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = None
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('tex_nodist_pl.ps', orientation='portrait', papertype='letter')
savefig('tex_nodist_ll.ps', orientation='landscape', papertype='letter')
savefig('tex_nodist_pl.eps', orientation='portrait')
savefig('tex_nodist_ll.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('tex_gs_pl.ps', orientation='portrait', papertype='letter')
savefig('tex_gs_ll.ps', orientation='landscape', papertype='letter')
savefig('tex_gs_pl.eps', orientation='portrait')
savefig('tex_gs_ll.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(20,10))
plot([1,2,3,4])
savefig('tex_xpdf_pl.ps', orientation='portrait', papertype='letter')
savefig('tex_xpdf_ll.ps', orientation='landscape', papertype='letter')
savefig('tex_xpdf_pl.eps', orientation='portrait')
savefig('tex_xpdf_ll.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = None
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('notex_nodist_ps.ps', orientation='portrait', papertype='letter')
savefig('notex_nodist_ls.ps', orientation='landscape', papertype='letter')
savefig('notex_nodist_ps.eps', orientation='portrait')
savefig('notex_nodist_ls.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('notex_gs_ps.ps', orientation='portrait', papertype='letter')
savefig('notex_gs_ls.ps', orientation='landscape', papertype='letter')
savefig('notex_gs_ps.eps', orientation='portrait')
savefig('notex_gs_ls.eps', orientation='landscape')
rcParams['text.usetex'] = False
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('notex_xpdf_ps.ps', orientation='portrait', papertype='letter')
savefig('notex_xpdf_ls.ps', orientation='landscape', papertype='letter')
savefig('notex_xpdf_ps.eps', orientation='portrait')
savefig('notex_xpdf_ls.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = None
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('tex_nodist_ps.ps', orientation='portrait', papertype='letter')
savefig('tex_nodist_ls.ps', orientation='landscape', papertype='letter')
savefig('tex_nodist_ps.eps', orientation='portrait')
savefig('tex_nodist_ls.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'ghostscript'
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('tex_gs_ps.ps', orientation='portrait', papertype='letter')
savefig('tex_gs_ls.ps', orientation='landscape', papertype='letter')
savefig('tex_gs_ps.eps', orientation='portrait')
savefig('tex_gs_ls.eps', orientation='landscape')
rcParams['text.usetex'] = True
rcParams['ps.usedistiller'] = 'xpdf'
figure(figsize=(6,3))
plot([1,2,3,4])
savefig('tex_xpdf_ps.ps', orientation='portrait', papertype='letter')
savefig('tex_xpdf_ls.ps', orientation='landscape', papertype='letter')
savefig('tex_xpdf_ps.eps', orientation='portrait')
savefig('tex_xpdf_ls.eps', orientation='landscape')
print 'ok'
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel