issues: 963089887
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 963089887 | MDU6SXNzdWU5NjMwODk4ODc= | 5681 | Complex LaTeX expressions in `long_name`s aren't rendered correctly when plotting | 13205162 | closed | 0 | 5 | 2021-08-06T22:54:11Z | 2021-11-28T17:07:18Z | 2021-11-28T17:07:18Z | CONTRIBUTOR | What happened: When I try to give a variable a What you expected to happen: I expected the name to get rendered by latex Minimal Complete Verifiable Example: In the example below I'm plotting a variable with a complex ```python import numpy as np from matplotlib import pyplot as plt import xarray as xr da = xr.DataArray(range(5), dims="x", coords = dict(x=range(5))) name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$" da.x.attrs = dict(long_name = name) da.plot() plt.figure() plt.plot(range(5)) plt.xlabel(name) ```
Anything else we need to know?: Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.9.2 (default, Mar 3 2021, 20:02:32) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 5.10.53-1-MANJARO machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.6 libnetcdf: 4.6.1 xarray: 0.17.0 pandas: 1.2.3 numpy: 1.19.2 scipy: 1.5.3 netCDF4: 1.5.6 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.2.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2021.04.0 distributed: 2021.04.0 matplotlib: 3.3.4 cartopy: 0.18.0 seaborn: None numbagg: None pint: 0.17 setuptools: 52.0.0.post20210125 pip: 21.0.1 conda: None pytest: None IPython: 7.22.0 sphinx: None |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/5681/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |
