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

Thomas Caswell tcaswell at gmail.com
Wed Jun 1 18:29:00 EDT 2016


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
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160601/bbf3e16c/attachment.html>


More information about the Matplotlib-users mailing list