home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER" and issue = 963089887 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • dcherian 1
  • Illviljan 1
  • keewis 1

issue 1

  • Complex LaTeX expressions in `long_name`s aren't rendered correctly when plotting · 3 ✖

author_association 1

  • MEMBER · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
981118995 https://github.com/pydata/xarray/issues/5681#issuecomment-981118995 https://api.github.com/repos/pydata/xarray/issues/5681 IC_kwDOAMm_X846erAT keewis 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
}
  Complex LaTeX expressions in `long_name`s aren't rendered correctly when plotting 963089887
894613319 https://github.com/pydata/xarray/issues/5681#issuecomment-894613319 https://api.github.com/repos/pydata/xarray/issues/5681 IC_kwDOAMm_X841UrdH Illviljan 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
}
  Complex LaTeX expressions in `long_name`s aren't rendered correctly when plotting 963089887
894560699 https://github.com/pydata/xarray/issues/5681#issuecomment-894560699 https://api.github.com/repos/pydata/xarray/issues/5681 IC_kwDOAMm_X841Uem7 dcherian 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
}
  Complex LaTeX expressions in `long_name`s aren't rendered correctly when plotting 963089887

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 523.615ms · About: xarray-datasette