home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 659142025 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • dcherian 1
  • yohai 1
  • DancingQuanta 1
  • mathause 1
  • stale[bot] 1

author_association 3

  • MEMBER 2
  • NONE 2
  • CONTRIBUTOR 1

issue 1

  • Dataset plot line · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1100953854 https://github.com/pydata/xarray/issues/4235#issuecomment-1100953854 https://api.github.com/repos/pydata/xarray/issues/4235 IC_kwDOAMm_X85Bnzj- stale[bot] 26384082 2022-04-17T21:43:44Z 2022-04-17T21:43:44Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset plot line 659142025
663157223 https://github.com/pydata/xarray/issues/4235#issuecomment-663157223 https://api.github.com/repos/pydata/xarray/issues/4235 MDEyOklzc3VlQ29tbWVudDY2MzE1NzIyMw== DancingQuanta 8419157 2020-07-23T18:15:33Z 2020-07-23T18:18:24Z NONE

To give a bit more context, an example code simulating an experimental measurement. ``` import numpy as np import xarray as xr from scipy.stats import norm from matplotlib import pyplot as plt

nominal x

x = xr.DataArray(np.arange(-10, 10, 0.1), dims='index', name='x')

Shift loc

loc = xr.DataArray(np.arange(-0.5, 1, 0.5), dims='loc', name='loc')

Number of experiments

exp = xr.DataArray(range(3), dims='exp', name='exp')

Add noise to x per experiment

noise = xr.DataArray(np.random.rand(len(x), len(loc)), coords={'loc': loc}, dims=['index', 'loc']) x = x + noise * 0.5

Measure

y = xr.apply_ufunc( norm.pdf, x, x['loc'], 1, input_core_dims=[['index'], [], []], output_core_dims=[['index']], vectorize=True )

Name

x.name = 'x' y.name = 'y'

Merge

data = xr.merge([x, y]) I wish to be able to use this

Plot y against x

data.plot.line(x='x', y='y', hue='loc') However, the closest I could get is with only `y` y.plot.line(x='index', hue='loc') ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset plot line 659142025
660595722 https://github.com/pydata/xarray/issues/4235#issuecomment-660595722 https://api.github.com/repos/pydata/xarray/issues/4235 MDEyOklzc3VlQ29tbWVudDY2MDU5NTcyMg== yohai 6164157 2020-07-19T06:25:27Z 2020-07-19T06:25:27Z CONTRIBUTOR

Sounds good. Just to mention that it might be easy to implement by stacking the arrays using .to_array and then just using DataArray.plot.line.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset plot line 659142025
660201329 https://github.com/pydata/xarray/issues/4235#issuecomment-660201329 https://api.github.com/repos/pydata/xarray/issues/4235 MDEyOklzc3VlQ29tbWVudDY2MDIwMTMyOQ== mathause 10194086 2020-07-17T16:21:30Z 2020-07-17T16:21:30Z MEMBER

To be sure - you want to get the x-values from one DataArray and the y-values from another? Similarly to http://xarray.pydata.org/en/stable/plotting.html#datasets but drawing lines instead of scatterpoints?

Sounds reasonable but may be a bit more difficult than scatter because you cannot just flatten your array (I think):

https://github.com/pydata/xarray/blob/1be777fe725a85b8cc0f65a2bc41f4bc2ba18043/xarray/plot/dataset_plot.py#L435-L437

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset plot line 659142025
660187478 https://github.com/pydata/xarray/issues/4235#issuecomment-660187478 https://api.github.com/repos/pydata/xarray/issues/4235 MDEyOklzc3VlQ29tbWVudDY2MDE4NzQ3OA== dcherian 2448579 2020-07-17T15:58:34Z 2020-07-17T15:58:34Z MEMBER

Sounds good to me.

cc @mathause @yohai

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset plot line 659142025

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