Minus signs for zticklabels absent when saved as PDF, unless manually specified

Hello all,
               First up, the prerequisites,

   - uname -a: Linux macallan3 3.16.0-71-generic #92~14.04.1-Ubuntu SMP Thu
   May 12 23:31:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
   - matplotlib version: '1.3.1'
   - install
   location: '/usr/lib/python3/dist-packages/matplotlib/__init__.py'
   - installed via apt-get.
   - no customizations to my rc file have been done

Consider the following test code
# ----------------------------- #
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.gca(projection='3d')
x = np.linspace(-1, 1)
y = np.linspace(-1, 1)
(xx, yy) = np.meshgrid(x, y)
ax.plot(x, y, x+y)
# ax.set_zticklabels(['-2', '-1.5', '-1.0', '-0.5', '0', '0.5', '1.0',
'1.5', '2.0'])
plt.savefig('test.pdf')
plt.show()
# ----------------------------- #
On my machine, this saves the figure as a pdf but the minus signs in front
of the negative zticklabels are missing. If I now manually set the
zticklabels by un-commenting the line above, the minus signs appear in the
pdf. This only occurs when saving as a .pdf. Saving as .jpg, .png, .eps,
.ps file has no problems. Can anyone else reproduce this issue?

Regards,
Nishan Mann

···

--
Nishan Singh Mann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160601/4ef0e4ff/attachment.html>

I can not reproduce this on 2.0.0b1 which means we fixed this bug at some
point between 1.3.1 and now.

Is it possible to get a newer version of mpl?

Tom

···

On Wed, Jun 1, 2016 at 6:13 PM Nishan Singh Mann < nishan.singh.mann at gmail.com> wrote:

Hello all,
               First up, the prerequisites,

   - uname -a: Linux macallan3 3.16.0-71-generic #92~14.04.1-Ubuntu SMP
   Thu May 12 23:31:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
   - matplotlib version: '1.3.1'
   - install
   location: '/usr/lib/python3/dist-packages/matplotlib/__init__.py'
   - installed via apt-get.
   - no customizations to my rc file have been done

Consider the following test code
# ----------------------------- #
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.gca(projection='3d')
x = np.linspace(-1, 1)
y = np.linspace(-1, 1)
(xx, yy) = np.meshgrid(x, y)
ax.plot(x, y, x+y)
# ax.set_zticklabels(['-2', '-1.5', '-1.0', '-0.5', '0', '0.5', '1.0',
'1.5', '2.0'])
plt.savefig('test.pdf')
plt.show()
# ----------------------------- #
On my machine, this saves the figure as a pdf but the minus signs in front
of the negative zticklabels are missing. If I now manually set the
zticklabels by un-commenting the line above, the minus signs appear in the
pdf. This only occurs when saving as a .pdf. Saving as .jpg, .png, .eps,
.ps file has no problems. Can anyone else reproduce this issue?

Regards,
Nishan Mann

--
Nishan Singh Mann
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160601/bbf3e16c/attachment.html&gt;

Thank Thomas, I concur. I just tried this on a machine running Ubuntu
16.04, matplotlib version 1.5.1 and issue is absent. Guess I will just use
pip or upgrade my distro.
Nishan

···

On Wed, 1 Jun 2016 at 18:29 Thomas Caswell <tcaswell at gmail.com> wrote:

I can not reproduce this on 2.0.0b1 which means we fixed this bug at some
point between 1.3.1 and now.

Is it possible to get a newer version of mpl?

Tom

On Wed, Jun 1, 2016 at 6:13 PM Nishan Singh Mann < > nishan.singh.mann at gmail.com> wrote:

Hello all,
               First up, the prerequisites,

   - uname -a: Linux macallan3 3.16.0-71-generic #92~14.04.1-Ubuntu SMP
   Thu May 12 23:31:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
   - matplotlib version: '1.3.1'
   - install
   location: '/usr/lib/python3/dist-packages/matplotlib/__init__.py'
   - installed via apt-get.
   - no customizations to my rc file have been done

Consider the following test code
# ----------------------------- #
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.gca(projection='3d')
x = np.linspace(-1, 1)
y = np.linspace(-1, 1)
(xx, yy) = np.meshgrid(x, y)
ax.plot(x, y, x+y)
# ax.set_zticklabels(['-2', '-1.5', '-1.0', '-0.5', '0', '0.5', '1.0',
'1.5', '2.0'])
plt.savefig('test.pdf')
plt.show()
# ----------------------------- #
On my machine, this saves the figure as a pdf but the minus signs in
front of the negative zticklabels are missing. If I now manually set the
zticklabels by un-commenting the line above, the minus signs appear in the
pdf. This only occurs when saving as a .pdf. Saving as .jpg, .png, .eps,
.ps file has no problems. Can anyone else reproduce this issue?

Regards,
Nishan Mann

--
Nishan Singh Mann

_______________________________________________

Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

--

Nishan Singh Mann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160604/1329e02f/attachment.html&gt;