home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 1510151748 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • mathause 2
  • daliagachc 2
  • dcherian 1

author_association 2

  • MEMBER 3
  • NONE 2

issue 1

  • Allow passing figure handle to FacetGrid · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1385875187 https://github.com/pydata/xarray/issues/7401#issuecomment-1385875187 https://api.github.com/repos/pydata/xarray/issues/7401 IC_kwDOAMm_X85Smsbz dcherian 2448579 2023-01-17T18:46:37Z 2023-01-17T18:47:08Z MEMBER

Seems like a good addition to me.

I'm not sure about passing Axes handles. IIRC FacetGrid does call a bunch of Figure methods, so there may be unintended consequences

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow passing figure handle to FacetGrid 1510151748
1366550470 https://github.com/pydata/xarray/issues/7401#issuecomment-1366550470 https://api.github.com/repos/pydata/xarray/issues/7401 IC_kwDOAMm_X85Rc-fG mathause 10194086 2022-12-28T10:36:03Z 2022-12-28T10:36:03Z MEMBER

Good point. Combining two FacetGrids is a good use case. My intuition would be to allow passing exactly the correct number of axes and not the figure. But then I have not heard from subfigure before now and this may also be a valid option.

python f, axs = plt.subplots(2, 4) da1.plot(col='season', ax=axs[0, :]) da2.plot(col='season', ax=axs[1, :])

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow passing figure handle to FacetGrid 1510151748
1364707378 https://github.com/pydata/xarray/issues/7401#issuecomment-1364707378 https://api.github.com/repos/pydata/xarray/issues/7401 IC_kwDOAMm_X85RV8gy daliagachc 15239248 2022-12-25T16:38:03Z 2022-12-25T16:38:03Z NONE

I have actually manage to make it work with minimal modification of the source xarray code: ```python import xarray as xr import matplotlib.pyplot as plt import matplotlib as mpl

def _pass(_,*__): pass

mpl.figure.SubFigure.tight_layout = _pass

da = xr.tutorial.open_dataset("air_temperature")['air'] fig:plt.Figure = plt.figure( constrained_layout=True, figsize = (24,22) )

(fig_top,fig_bot) = fig.subfigures(2,1)

( da.groupby(da['time'].dt.season) .mean() .plot(col='season',fig=fig_top) )

( da.groupby(da['time'].dt.hour) .mean() .plot(col='hour', fig=fig_bot) ) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow passing figure handle to FacetGrid 1510151748
1364696481 https://github.com/pydata/xarray/issues/7401#issuecomment-1364696481 https://api.github.com/repos/pydata/xarray/issues/7401 IC_kwDOAMm_X85RV52h daliagachc 15239248 2022-12-25T15:12:15Z 2022-12-25T15:12:15Z NONE

thanks for the reply. Somehow i don't find an elegant way that does not involve many loops and hoops. Lets consider the following short example: I want to produce a figure that takes the xr.tutorial.open_dataset("air_temperature") and produces a mean grouped by season and hour in the same figure: Creating the top and bottom rows independently is super efficient with xarray: ```python import xarray as xr import matplotlib.pyplot as plt

da = xr.tutorial.open_dataset("air_temperature")['air']

( da.groupby(da['time'].dt.season) .mean() .plot(col='season') )

( da.groupby(da['time'].dt.hour) .mean() .plot(col='hour') ) ```

but combining both seems quite complicated to me. I wish I could pass a subfigure to the plot function in the following way ```python fig:plt.Figure = plt.figure() (fig_top,fig_bot) = fig.subfigures(2,1)

( da.groupby(da['time'].dt.season) .mean() .plot(col='season',fig=fig_top) )

( da.groupby(da['time'].dt.hour) .mean() .plot(col='hour', fig=fig_bot) ) ```

maybe I am missing a smart way of doing this? cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow passing figure handle to FacetGrid 1510151748
1364669991 https://github.com/pydata/xarray/issues/7401#issuecomment-1364669991 https://api.github.com/repos/pydata/xarray/issues/7401 IC_kwDOAMm_X85RVzYn mathause 10194086 2022-12-25T12:01:27Z 2022-12-25T12:01:27Z MEMBER

I think the usual workflow is to create the figure with gridspec and then update the created subplots and figure. Is there something that is not possible if done this way around?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow passing figure handle to FacetGrid 1510151748

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