issue_comments
10 rows where author_association = "MEMBER" and issue = 948049609 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Replace dataset scatter with the dataarray version · 10 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1159477493 | https://github.com/pydata/xarray/pull/5622#issuecomment-1159477493 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X85FHDj1 | Illviljan 14371165 | 2022-06-18T14:48:36Z | 2022-06-18T14:48:36Z | MEMBER | pre-commit.ci autofix |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
1018993772 | https://github.com/pydata/xarray/pull/5622#issuecomment-1018993772 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X848vJxs | Illviljan 14371165 | 2022-01-22T00:40:23Z | 2022-01-22T00:40:23Z | MEMBER | Line plots aren't completely broken now. The array is being stacked to 1 dim now. Using nan to split the lines at appropriate places.
```python
ds = xr.tutorial.scatter_example_dataset(seed=42)
hue_ = "y"
x_ = "y"
size_="y"
z_ = "z"
fig = plt.figure()
ax = fig.add_subplot(1, 2, 1, projection='3d')
ds.A.sel(w="one").plot.line(x=x_, z=z_, hue=hue_, linewidth=size_, ax=ax)
ax = fig.add_subplot(1, 2, 2, projection='3d')
ds.A.sel(w="one").plot.scatter(x=x_, z=z_, hue=hue_, markersize=size_, ax=ax)
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
1008210008 | https://github.com/pydata/xarray/pull/5622#issuecomment-1008210008 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X848GBBY | Illviljan 14371165 | 2022-01-09T01:47:20Z | 2022-01-09T01:47:20Z | MEMBER | Gotten a little sidetracked with line plots for a while now. I'm annoyed that all the primitives are different for each plotting type, e.g Collections, Line2D, list of Line2D, etc. It makes it hard to use similar code paths.
So I've been trying out LineCollection a little which behaves very similarly to In the example below you can clearly see that we have two curves where the hue changes somehow over time. But I'm having trouble understanding how to determine what's supposed to be a line. For example if x and y were 4d arrays how should it be split? scatter uses ravel to get around these hard questions. Maybe you can ravel just certain dimensions? Like if Not sure how to do that in xarray though. Thoughts, ideas or other examples are appreciated.
```python
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import numpy as np
from matplotlib.collections import LineCollection
import numpy as np
np.random.seed(42)
dates = np.arange("2017-01-01", "2017-06-20", dtype="datetime64[D]" )
y = np.cumsum(np.random.normal(size=len(dates)))
y2 = np.cumsum(np.random.normal(size=len(dates)))
c = np.cumsum(np.random.normal(size=len(dates)))
c2 = np.cumsum(np.random.normal(size=len(dates)))
s = 1 + np.minimum(np.cumsum(np.random.normal(size=len(dates))), 0)
s2 = 1 + np.minimum(np.cumsum(np.random.normal(size=len(dates))), 0)
fig, ax = plt.subplots()
#convert dates to numbers first
inxval = mdates.date2num(dates)
points = np.array([inxval, y]).T.reshape(-1,1,2)
segments = np.concatenate([points[:-1],points[1:]], axis=1)
lc = LineCollection(segments, cmap="plasma", linewidth=s)
lc.set_array(c)
p = ax.add_collection(lc)
points2 = np.array([inxval, y2]).T.reshape(-1,1,2)
segments2 = np.concatenate([points2[:-1],points2[1:]], axis=1)
lc2 = LineCollection(segments2, cmap="plasma", linewidth=s2)
lc2.set_array(c2)
p = ax.add_collection(lc2)
fig.colorbar(p, ax=ax)
ax.xaxis_date()
ax.autoscale_view()
plt.show()
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
984071123 | https://github.com/pydata/xarray/pull/5622#issuecomment-984071123 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X846p7vT | Illviljan 14371165 | 2021-12-01T21:29:42Z | 2021-12-01T21:40:17Z | MEMBER |
Pretty much what I did. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
983728169 | https://github.com/pydata/xarray/pull/5622#issuecomment-983728169 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X846ooAp | mathause 10194086 | 2021-12-01T15:02:59Z | 2021-12-01T15:02:59Z | MEMBER | Not sure if this is too naïve from my side but can you just pass N+1 levels to the function? |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
981065902 | https://github.com/pydata/xarray/pull/5622#issuecomment-981065902 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X846eeCu | Illviljan 14371165 | 2021-11-28T11:11:00Z | 2021-11-28T11:11:00Z | MEMBER | I'm struggling getting categorical colorbars to work nicely:
```python
import numpy as np
import xarray as xr
das = [
xr.DataArray(
np.random.randn(3, 3, 4, 4, 2),
dims=["x", "row", "col", "hue", "size"],
coords=[range(k) for k in [3, 3, 4, 4, 2]],
)
for _ in [1, 2]
]
ds = xr.Dataset({"A": das[0], "B": das[1]})
ds.hue.name = "huename"
ds.hue.attrs["units"] = "hunits"
ds.x.attrs["units"] = "xunits"
ds.col.attrs["units"] = "colunits"
ds.row.attrs["units"] = "rowunits"
ds.A.attrs["units"] = "Aunits"
ds.B.attrs["units"] = "Bunits"
ds2 = ds.copy()
ds2["hue"] = ["d", "a", "c", "b"]
g = ds2.plot.scatter(
x="A",
y="B",
hue="hue",
markersize="size",
col="col",
add_legend=True,
add_colorbar=True,
)
```
My goals are: * 4 colors for 4 categories * ticks should be centered on the color. One of the issues are that https://github.com/pydata/xarray/blob/135a3351bf77a4a55e76a8c60b40852ec10cdd4a/xarray/plot/utils.py#L69 Seems to be focused on contour(f) plots only which leads to the colorbar having N-1 colors all the time. Any ideas how to solve this is appreciated. Related links: * https://stackoverflow.com/questions/14777066/matplotlib-discrete-colorbar * https://gist.github.com/jakevdp/8a992f606899ac24b711 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
890044593 | https://github.com/pydata/xarray/pull/5622#issuecomment-890044593 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X841DQCx | mathause 10194086 | 2021-07-30T17:29:24Z | 2021-07-30T17:29:24Z | MEMBER |
Yes that would be a good idea. A deprecation would be nice but for the backends refactor (
Good you noticed - I also think the plotting tests are not comprehensive. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
887055377 | https://github.com/pydata/xarray/pull/5622#issuecomment-887055377 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X84032QR | Illviljan 14371165 | 2021-07-26T22:00:14Z | 2021-07-26T22:00:14Z | MEMBER | The scatter tests doesn't seem to make sure x,y values are plotted as expected. I was testing the test cases for other reasons and noticed that the x and values were opposite. You can check the x and y values are returned in the expected order with something like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
886869099 | https://github.com/pydata/xarray/pull/5622#issuecomment-886869099 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X8403Ixr | TomNicholas 35968931 | 2021-07-26T16:58:23Z | 2021-07-26T16:58:23Z | MEMBER | My 2 cents:
Obviously it would be nice to be able to get the arguments in the same order across functions, but I think we probably care more about not suddenly breaking backwards compatibility - any change to the order should technically require a deprecation cycle... That said standardizing something more consistent would be good.
Not really sure what the best thing to do is.
My understanding is that testing the displayed output of plotting functions is notoriously tricky and unreliable, hence when we currently test we interrogate properties of matplotlib objects. There are libraries that check images are correct, and
Is there no obvious object property test that would have caught this? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 | |
886264499 | https://github.com/pydata/xarray/pull/5622#issuecomment-886264499 | https://api.github.com/repos/pydata/xarray/issues/5622 | IC_kwDOAMm_X84001Kz | Illviljan 14371165 | 2021-07-25T22:09:37Z | 2021-07-25T22:09:37Z | MEMBER | Good idea to keep the dataarray scatter non-public for now, found quite a few bugs there. :) Turned out a little trickier than expected to get the tests passing, I'll continue pondering this next week. Some thoughts before I forget them: * How important is the argument order for the plotting functions? It's been very difficult getting the line plot and scatter to behave the same because they have completely different order of inputs. Would be easy if we could just force named arguments? * How important are figure legends in facetgrid? Some tests breaks on this now but I'm not sure it's a good idea to change to figlegends instead of legend per plot. * We seem to be lacking tests regarding how the plot should look like. For example an acccidentally inverted plot didn't crash the tests. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Replace dataset scatter with the dataarray version 948049609 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
user 3