home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 618141254 and user = 60435591 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • veenstrajelmer · 3 ✖

issue 1

  • Colormap Normalisation Giving Unexpected/Incorrect Output · 3 ✖

author_association 1

  • CONTRIBUTOR 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1464035444 https://github.com/pydata/xarray/issues/4061#issuecomment-1464035444 https://api.github.com/repos/pydata/xarray/issues/4061 IC_kwDOAMm_X85XQ2h0 veenstrajelmer 60435591 2023-03-10T16:10:44Z 2023-03-10T16:10:44Z CONTRIBUTOR

@rjp23 with the latest update to the PR (thanks to @jklymak), your example code produced identical figures without changing it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Colormap Normalisation Giving Unexpected/Incorrect Output 618141254
1456434882 https://github.com/pydata/xarray/issues/4061#issuecomment-1456434882 https://api.github.com/repos/pydata/xarray/issues/4061 IC_kwDOAMm_X85Wz27C veenstrajelmer 60435591 2023-03-06T16:16:31Z 2023-03-06T16:16:31Z CONTRIBUTOR

@rjp23: could you close the issue if this indeed resolves your problem?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Colormap Normalisation Giving Unexpected/Incorrect Output 618141254
1446096001 https://github.com/pydata/xarray/issues/4061#issuecomment-1446096001 https://api.github.com/repos/pydata/xarray/issues/4061 IC_kwDOAMm_X85WMayB veenstrajelmer 60435591 2023-02-27T10:43:51Z 2023-02-27T11:16:59Z CONTRIBUTOR

As suggested by https://github.com/pydata/xarray/pull/7553#discussion_r1117264787, pass levels=bounds instead of norm=norm to data.plot(). Your example code results in a plot as expected. Would this solve your issue?

``` import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors import xarray

example from https://matplotlib.org/3.1.1/tutorials/colors/colormapnorms.html

for colormap normalisation

N = 100 X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] Z1 = np.exp(-X2 - Y2) Z2 = np.exp(-(X - 1)2 - (Y - 1)2) Z = (Z1 - Z2) * 2

fig, ax = plt.subplots(2, 1, figsize=(8, 8)) ax = ax.flatten()

bounds = np.linspace(-1, 1, 10) norm = colors.BoundaryNorm(boundaries=bounds, ncolors=256)

ax[0].pcolormesh(X, Y, Z, norm=norm, cmap='RdBu_r')

now add data into dataset and plot it using same normalisation

data = xarray.DataArray(Z, dims=('x', 'y'), coords={'x': X[:,0], 'y': Y[0,:]}) data.plot(ax=ax[1], x='x', y='y', levels=bounds, add_colorbar=False) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Colormap Normalisation Giving Unexpected/Incorrect Output 618141254

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 621.878ms · About: xarray-datasette