Skip to content

Commit 632ab72

Browse files
authored
Do not use the deprecated matplotlib config option 'text.latex.preview'. (#5233)
Deprecated as of version 3.3.4, see: https://matplotlib.org/3.3.4/api/api_changes.html#text-latex-preview-rcparam Requires matplotlib~=3.3,>=3.3.4. Fixes #5231.
1 parent 01a8846 commit 632ab72

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

aiida/orm/nodes/data/array/bands.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,9 +1612,6 @@ def _prepare_json(self, main_file_name='', comments=True): # pylint: disable=un
16121612
$xydata
16131613
""")
16141614

1615-
# text.latex.preview=True is needed to have a proper alignment of
1616-
# tick marks with and without subscripts
1617-
# see e.g. http://matplotlib.org/1.3.0/examples/pylab_examples/usetex_baseline_test.html
16181615
MATPLOTLIB_HEADER_AGG_TEMPLATE = Template(
16191616
"""# -*- coding: utf-8 -*-
16201617
@@ -1629,8 +1626,6 @@ def _prepare_json(self, main_file_name='', comments=True): # pylint: disable=un
16291626
rc('mathtext', fontset='cm')
16301627
16311628
rc('text', usetex=True)
1632-
import matplotlib.pyplot as plt
1633-
plt.rcParams.update({'text.latex.preview': True})
16341629
16351630
import pylab as pl
16361631
@@ -1641,9 +1636,6 @@ def _prepare_json(self, main_file_name='', comments=True): # pylint: disable=un
16411636
"""
16421637
)
16431638

1644-
# text.latex.preview=True is needed to have a proper alignment of
1645-
# tick marks with and without subscripts
1646-
# see e.g. http://matplotlib.org/1.3.0/examples/pylab_examples/usetex_baseline_test.html
16471639
MATPLOTLIB_HEADER_TEMPLATE = Template(
16481640
"""# -*- coding: utf-8 -*-
16491641
@@ -1655,8 +1647,6 @@ def _prepare_json(self, main_file_name='', comments=True): # pylint: disable=un
16551647
rc('mathtext', fontset='cm')
16561648
16571649
rc('text', usetex=True)
1658-
import matplotlib.pyplot as plt
1659-
plt.rcParams.update({'text.latex.preview': True})
16601650
16611651
import pylab as pl
16621652

setup.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"atomic_tools": [
8383
"PyCifRW~=4.4",
8484
"ase~=3.18",
85+
"matplotlib~=3.3,>=3.3.4",
8586
"pymatgen>=2019.7.2,<=2022.02.03,!=2019.9.7",
8687
"pymysql~=0.9.3",
8788
"seekpath~=1.9,>=1.9.3",

0 commit comments

Comments
 (0)