eps and useTex: tick labels drawn over legend box

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.

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 <giltirn@...287...> 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
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Just in case, I have opened a git issue on this.

-JJ

···

On Wed, Jun 1, 2011 at 1:23 PM, Jae-Joon Lee <lee.j.joon@...287...> 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 <giltirn@...287...> 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
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

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.

eps and useTex: tick labels drawn over legend box · Issue #131 · matplotlib/matplotlib · GitHub

-JJ

On Wed, Jun 1, 2011 at 1:23 PM, Jae-Joon Lee <lee.j.joon@...287...> 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 <giltirn@...287...> 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
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
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.