home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 690371800

This data as json

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/4414#issuecomment-690371800 https://api.github.com/repos/pydata/xarray/issues/4414 690371800 MDEyOklzc3VlQ29tbWVudDY5MDM3MTgwMA== 30407294 2020-09-10T15:35:25Z 2020-09-10T15:58:29Z NONE

Hi @dcherian,

Thanks for the good idea! Changing the dataset that you want to plot is probably the easiest option.

Here is my implementation of that to go with my original code.

```python def change_ds_for_graph(dsA):

ds = dsA.copy()

for varname, da in ds.data_vars.items():
    for attr in da.attrs:
        if attr in ['units', 'long_name']:
            da.attrs[attr] = proper_units(tex_escape(da.attrs[attr]))

for coord in ds.coords:
    for attr in ds.coords[coord].attrs:
        if attr in ['units', 'long_name']:
            da.coords[coord].attrs[attr] = proper_units(tex_escape(da.coords[coord].attrs[attr]))

return ds

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  697814535
Powered by Datasette · Queries took 163.74ms · About: xarray-datasette