html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/5681#issuecomment-981118995,https://api.github.com/repos/pydata/xarray/issues/5681,981118995,IC_kwDOAMm_X846erAT,14808389,2021-11-28T17:07:18Z,2021-11-28T17:07:18Z,MEMBER,should have been closed by #5682,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,963089887
https://github.com/pydata/xarray/issues/5681#issuecomment-894613319,https://api.github.com/repos/pydata/xarray/issues/5681,894613319,IC_kwDOAMm_X841UrdH,14371165,2021-08-07T06:29:19Z,2021-08-07T06:29:19Z,MEMBER,"It's the newline join that's the problem. You can get the latex working as textwrap intends by using `""$\n$"".join`
```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$""
name = ""$\n$"".join(textwrap.wrap(name, 30))
da.x.attrs = dict(long_name = name)
da.plot()
plt.figure()
plt.plot(range(5))
plt.xlabel(name)
```
But that looks worse than the original, checking if the string is latex-able seems a good idea.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,963089887
https://github.com/pydata/xarray/issues/5681#issuecomment-894561619,https://api.github.com/repos/pydata/xarray/issues/5681,894561619,IC_kwDOAMm_X841Ue1T,13205162,2021-08-06T23:14:34Z,2021-08-06T23:14:34Z,CONTRIBUTOR,"I'm not entirely sure why that would make the LaTeX renderer fail. But if that's the case and skipping it is an option, I'd test that both the first and last characters are `$` before skipping.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,963089887
https://github.com/pydata/xarray/issues/5681#issuecomment-894560699,https://api.github.com/repos/pydata/xarray/issues/5681,894560699,IC_kwDOAMm_X841Uem7,2448579,2021-08-06T23:11:29Z,2021-08-06T23:11:29Z,MEMBER,"I agree this is annoying but there is no good solution AFAIK.
We use textwrap here:
https://github.com/pydata/xarray/blob/8b95da8e21a9d31de9f79cb0506720595f49e1dd/xarray/plot/utils.py#L493
I guess we could skip it if the first character in `name` is `$`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,963089887
https://github.com/pydata/xarray/issues/5681#issuecomment-894555968,https://api.github.com/repos/pydata/xarray/issues/5681,894555968,IC_kwDOAMm_X841UddA,13205162,2021-08-06T22:55:28Z,2021-08-06T22:55:57Z,CONTRIBUTOR,"Note that for simple latex expressions xarray appears to work fine. For example `name = r""$\mathrm{mean}(\epsilon_k)$""` works in both figures in the example above.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,963089887