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
When I try to give a variable a long_name that's a complex latex expression prefixed with some data and then plot that variable the expression doesn't get rendered by latex. (Note that when the text is suffixed it does work).
### MVCE confirmation
- [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- [X] Complete example — the example is self-contained, including all data and the text of any traceback.
- [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result.
- [X] New issue — a search of GitHub Issues suggests this is not a duplicate.
- [X] Recent environment — the issue occurs with the latest version of xarray and its dependencies.
### Relevant log output
_No response_
### Anything else we need to know?
Mixed math and text work if the long_name str starts with a math expression and its corresponding $ sign, e.g., `r"$a$ Data $Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$"`.
Maybe this is related to #5681
### Environment
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.13.0 | packaged by conda-forge | (main, Oct 8 2024, 20:04:32) [GCC 13.3.0]
python-bits: 64
OS: Linux
OS-release: 6.9.3-76060903-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.3
libnetcdf: None
xarray: 2024.10.0
pandas: 2.2.3
numpy: 2.1.3
scipy: 1.14.1
netCDF4: None
pydap: None
h5netcdf: 1.4.0
h5py: 3.12.1
zarr: None
cftime: None
nc_time_axis: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: 3.9.2
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 75.3.0
pip: None
conda: None
pytest: None
mypy: None
IPython: 8.29.0
sphinx: None
</details>
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the Contributing Guide for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!
What happened?
When I try to give a variable a long_name that's a complex latex expression prefixed with some data and then plot that variable the expression doesn't get rendered by latex. (Note that when the text is suffixed it does work).
What did you expect to happen?
Expected the name to get rendered properly.
Minimal Complete Verifiable Example
The text was updated successfully, but these errors were encountered: