Package: python3-matplotlib
Version: 1.5.2~rc2-1
Severity: normal

Dear Maintainer,

Normally strings like r'$\chi_A$' in title or axis commands are rendered into a 
greek letter chi with the subscript A by matplotlib.
The version of matplotlib renders that kind of math text incorrectly: it 
outputs right pointing triangle with subscript A.
The problem disappears if the system latex is used for text rendering.
I am attaching a simple python code to illustrate the problem: matplotlib 
renderer is udes by default, while the system latex is invoked
if "-t" key is used.

Thanks,
Alexei

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.5.5-0 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages python3-matplotlib depends on:
ii  libc6                               2.22-13
ii  libfreetype6                        2.6.3-3+b1
ii  libgcc1                             1:6.1.1-8
ii  libjs-jquery                        1.12.3-1
ii  libjs-jquery-ui                     1.10.1+dfsg-1
ii  libpng16-16                         1.6.23-1
ii  libstdc++6                          6.1.1-8
ii  python-matplotlib-data              1.5.2~rc2-1
ii  python3                             3.5.1-4
ii  python3-cycler                      0.10.0-1
ii  python3-dateutil                    2.4.2-1
ii  python3-numpy [python3-numpy-abi9]  1:1.11.1~rc1-1
ii  python3-pyparsing                   2.1.5+dfsg1-1
ii  python3-six                         1.10.0-3
ii  python3-tz                          2015.7+dfsg-0.1

Versions of packages python3-matplotlib recommends:
pn  python3-pil  <none>
ii  python3-tk   3.5.1-1

Versions of packages python3-matplotlib suggests:
ii  dvipng                 1.14-2+b2
ii  ffmpeg                 7:3.0.2-4
ii  ghostscript            9.19~dfsg-1+b1
ii  gir1.2-gtk-3.0         3.20.6-2
pn  inkscape               <none>
pn  ipython3               <none>
ii  librsvg2-common        2.40.16-1
pn  python-matplotlib-doc  <none>
pn  python3-cairocffi      <none>
pn  python3-gi             <none>
pn  python3-gi-cairo       <none>
pn  python3-gobject        <none>
ii  python3-nose           1.3.7-2
ii  python3-pyqt4          4.11.4+dfsg-2
ii  python3-scipy          0.17.1-1
ii  python3-sip            4.18+dfsg-1
ii  python3-tornado        4.3.0-2
pn  texlive-extra-utils    <none>
ii  texlive-latex-extra    2016.20160623-1
pn  ttf-staypuft           <none>

-- no debconf information
import argparse as ap

import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt

opts = ap.ArgumentParser(description='Test math text rendering by matplotlib')
opts.add_argument('-t', help='use system TeX', action='store_true')
args = opts.parse_args()

x = np.linspace(0,1,10)
y = np.cos(x)

if args.t:
    plt.rc('text', usetex=True)
plt.figure()
plt.plot(x, y)
plt.xlabel(r'$\chi_A$')
plt.savefig('mpl_backend_test.png', format='png')
plt.close()

Reply via email to