[Matplotlib-users] Minus signs for zticklabels absent when saved as PDF, unless manually specified

Nishan Singh Mann nishan.singh.mann at gmail.com
Wed Jun 1 18:13:31 EDT 2016

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'])
# ----------------------------- #
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?

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>

More information about the Matplotlib-users mailing list