SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Brannon <gi...@gm...> - 2011年05月31日 21:34:28
Hi,
I am having trouble with matplotlib 1.0.1 drawing the axis tick labels over
the legend box in the eps output when useTex is set to true. The plot shown
after calling plt.show() looks fine, as does the output in pdf, png, svg
etc. Only the postscript appears to be affected.
The following simple example produces the png and eps files given at the
bottom of this post:
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import rc
rc('text', usetex=True)
g1 = plt.plot([1,2,3,4],[500,600,700,800])
g2 = plt.plot([1,2,3,4],[700,300,700,200])
g3 = plt.plot([1,2,3,4],[800,600,900,800])
plt.figlegend([g1,g2,g3],['test1','test2','test3'],'upper left')
plt.savefig('image.png')
plt.savefig('image.eps')
plt.show()
http://old.nabble.com/file/p31744864/image.eps image.eps 
http://old.nabble.com/file/p31744864/image.png image.png 
I would very much appreciate some help resolving this issue.
Thanks
-- 
View this message in context: http://old.nabble.com/eps-and-useTex%3A-tick-labels-drawn-over-legend-box-tp31744864p31744864.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2011年06月01日 04:23:49
I'm not 100% sure on this but it seems that this is a limitation of
"psfrag" that the ps backend relies on. The ps backend first produces
an eps file without TeX labels, and these TeX labels are put on the
eps file with latex+psfrag. And it seems these TeX labels are always
above the contents of the eps file.
Unfortunately, I don't think this can be easily fixed.
Regards,
-JJ
On Wed, Jun 1, 2011 at 6:34 AM, Brannon <gi...@gm...> wrote:
>
> Hi,
>
> I am having trouble with matplotlib 1.0.1 drawing the axis tick labels over
> the legend box in the eps output when useTex is set to true. The plot shown
> after calling plt.show() looks fine, as does the output in pdf, png, svg
> etc. Only the postscript appears to be affected.
>
> The following simple example produces the png and eps files given at the
> bottom of this post:
>
> import matplotlib as mpl
> import matplotlib.pyplot as plt
> from matplotlib import rc
>
> rc('text', usetex=True)
>
> g1 = plt.plot([1,2,3,4],[500,600,700,800])
> g2 = plt.plot([1,2,3,4],[700,300,700,200])
> g3 = plt.plot([1,2,3,4],[800,600,900,800])
>
> plt.figlegend([g1,g2,g3],['test1','test2','test3'],'upper left')
>
> plt.savefig('image.png')
> plt.savefig('image.eps')
>
> plt.show()
>
> http://old.nabble.com/file/p31744864/image.eps image.eps
> http://old.nabble.com/file/p31744864/image.png image.png
>
> I would very much appreciate some help resolving this issue.
>
> Thanks
> --
> View this message in context: http://old.nabble.com/eps-and-useTex%3A-tick-labels-drawn-over-legend-box-tp31744864p31744864.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2011年06月01日 04:24:52
Just in case, I have opened a git issue on this.
https://github.com/matplotlib/matplotlib/issues/131
-JJ
On Wed, Jun 1, 2011 at 1:23 PM, Jae-Joon Lee <lee...@gm...> wrote:
> I'm not 100% sure on this but it seems that this is a limitation of
> "psfrag" that the ps backend relies on. The ps backend first produces
> an eps file without TeX labels, and these TeX labels are put on the
> eps file with latex+psfrag. And it seems these TeX labels are always
> above the contents of the eps file.
>
> Unfortunately, I don't think this can be easily fixed.
> Regards,
>
> -JJ
>
>
> On Wed, Jun 1, 2011 at 6:34 AM, Brannon <gi...@gm...> wrote:
>>
>> Hi,
>>
>> I am having trouble with matplotlib 1.0.1 drawing the axis tick labels over
>> the legend box in the eps output when useTex is set to true. The plot shown
>> after calling plt.show() looks fine, as does the output in pdf, png, svg
>> etc. Only the postscript appears to be affected.
>>
>> The following simple example produces the png and eps files given at the
>> bottom of this post:
>>
>> import matplotlib as mpl
>> import matplotlib.pyplot as plt
>> from matplotlib import rc
>>
>> rc('text', usetex=True)
>>
>> g1 = plt.plot([1,2,3,4],[500,600,700,800])
>> g2 = plt.plot([1,2,3,4],[700,300,700,200])
>> g3 = plt.plot([1,2,3,4],[800,600,900,800])
>>
>> plt.figlegend([g1,g2,g3],['test1','test2','test3'],'upper left')
>>
>> plt.savefig('image.png')
>> plt.savefig('image.eps')
>>
>> plt.show()
>>
>> http://old.nabble.com/file/p31744864/image.eps image.eps
>> http://old.nabble.com/file/p31744864/image.png image.png
>>
>> I would very much appreciate some help resolving this issue.
>>
>> Thanks
>> --
>> View this message in context: http://old.nabble.com/eps-and-useTex%3A-tick-labels-drawn-over-legend-box-tp31744864p31744864.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with vRanger.
>> Installation's a snap, and flexible recovery options mean your data is safe,
>> secure and there when you need it. Data protection magic?
>> Nope - It's vRanger. Get your free trial download today.
>> http://p.sf.net/sfu/quest-sfdev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Brannon <gi...@gm...> - 2011年06月01日 16:55:24
Hi Jae-Joon,
Thank you for your help. For the time being, I have discovered that using
pdf output and converting to eps using pdf2ps and ps2eps avoids this
problem.
Best,
Bran
Jae-Joon Lee wrote:
> 
> Just in case, I have opened a git issue on this.
> 
> https://github.com/matplotlib/matplotlib/issues/131
> 
> -JJ
> 
> 
> 
> On Wed, Jun 1, 2011 at 1:23 PM, Jae-Joon Lee <lee...@gm...> wrote:
>> I'm not 100% sure on this but it seems that this is a limitation of
>> "psfrag" that the ps backend relies on. The ps backend first produces
>> an eps file without TeX labels, and these TeX labels are put on the
>> eps file with latex+psfrag. And it seems these TeX labels are always
>> above the contents of the eps file.
>>
>> Unfortunately, I don't think this can be easily fixed.
>> Regards,
>>
>> -JJ
>>
>>
>> On Wed, Jun 1, 2011 at 6:34 AM, Brannon <gi...@gm...> wrote:
>>>
>>> Hi,
>>>
>>> I am having trouble with matplotlib 1.0.1 drawing the axis tick labels
>>> over
>>> the legend box in the eps output when useTex is set to true. The plot
>>> shown
>>> after calling plt.show() looks fine, as does the output in pdf, png, svg
>>> etc. Only the postscript appears to be affected.
>>>
>>> The following simple example produces the png and eps files given at the
>>> bottom of this post:
>>>
>>> import matplotlib as mpl
>>> import matplotlib.pyplot as plt
>>> from matplotlib import rc
>>>
>>> rc('text', usetex=True)
>>>
>>> g1 = plt.plot([1,2,3,4],[500,600,700,800])
>>> g2 = plt.plot([1,2,3,4],[700,300,700,200])
>>> g3 = plt.plot([1,2,3,4],[800,600,900,800])
>>>
>>> plt.figlegend([g1,g2,g3],['test1','test2','test3'],'upper left')
>>>
>>> plt.savefig('image.png')
>>> plt.savefig('image.eps')
>>>
>>> plt.show()
>>>
>>> http://old.nabble.com/file/p31744864/image.eps image.eps
>>> http://old.nabble.com/file/p31744864/image.png image.png
>>>
>>> I would very much appreciate some help resolving this issue.
>>>
>>> Thanks
>>> --
>>> View this message in context:
>>> http://old.nabble.com/eps-and-useTex%3A-tick-labels-drawn-over-legend-box-tp31744864p31744864.html
>>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Simplify data backup and recovery for your virtual environment with
>>> vRanger.
>>> Installation's a snap, and flexible recovery options mean your data is
>>> safe,
>>> secure and there when you need it. Data protection magic?
>>> Nope - It's vRanger. Get your free trial download today.
>>> http://p.sf.net/sfu/quest-sfdev2dev
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger. 
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today. 
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/eps-and-useTex%3A-tick-labels-drawn-over-legend-box-tp31744864p31751252.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /