You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If matplotlib.axes.Axes.indicate_inset is called without specifying the labelkwarg, then it sets indicate_inset as a default value (as per the source). If it does so while mpl.rc('text', usetex=True) is set and also creating a legend, LaTeX attempts to typeset the label indicate_inset, but fails due to the unescaped underscore. A solution is to pass label='' to indicate_inset, which should possibly be the new default.
Actual outcome
A typical long LaTeX callback list, the relevant snippets are:
.
.
.
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 310, in _run_checked_subprocess
raise RuntimeError(
RuntimeError: latex was not able to process the following string:
b'indicate_inset'
.
.
.
! Missing $ inserted.
<inserted text>
$
l.14 ...{10.000000}{12.500000}{\sffamily indicate_
inset}
No pages of output.
.
.
.
Matplotlib version
Operating system: Ubuntu 20.04.1LTS, kernel version 5.4.0-62-generic
Matplotlib version 3.1.2
Matplotlib backend TkAgg:
Python version: 3.8.5
Other libraries: irrelevant
python and matplotlib both installed from official ubuntu repositories
The text was updated successfully, but these errors were encountered:
Ooops, guess we never tested with a legend (I assume it makes a spurious legend entry regardless of usetex?)
I agree that this should be fixed and that there should be no label (presumably by default). I guess I was thinking of the label as a way of differentiating it from data. One alternative is to change the label to _indicate_inset which will not get a legend entry I believe. Any interest in tackling this? (Developers guide: https://matplotlib.org/stable/devel/index.html)
Bug report
Bug summary
If
matplotlib.axes.Axes.indicate_inset
is called without specifying thelabel
kwarg
, then it setsindicate_inset
as a default value (as per the source). If it does so whilempl.rc('text', usetex=True)
is set and also creating a legend, LaTeX attempts to typeset the labelindicate_inset
, but fails due to the unescaped underscore. A solution is to passlabel=''
toindicate_inset
, which should possibly be the new default.Code for reproduction
Actual outcome
A typical long LaTeX callback list, the relevant snippets are:
Matplotlib version
TkAgg
:python and matplotlib both installed from official ubuntu repositories
The text was updated successfully, but these errors were encountered: