id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 320632674,MDExOlB1bGxSZXF1ZXN0MTg2MjI4NjMz,2107,ENH: added FacetGrid functionality to line plots,6164157,closed,0,,,14,2018-05-06T21:56:54Z,2022-11-16T14:36:56Z,2018-06-04T15:54:45Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2107," closes #2084 a) plot.line can now accept also 'row' and 'col' keywords. b) If 'hue' is passed as a keyword to DataArray.plot() it generates a line plot FacetGrid. c) Line plots are automatically generated if the number of dimensions after faceting along row and/or col is one. - [x] Closes #xxxx (remove if there is no corresponding issue, which should only be the case for minor changes) - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2107/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 462049420,MDExOlB1bGxSZXF1ZXN0MjkyODQyOTg5,3054,Flat iteration over DataArray,6164157,closed,0,,,6,2019-06-28T14:00:24Z,2021-06-17T16:16:50Z,2021-06-17T16:16:50Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3054," - [ ] Tests added - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API A very simple way to iterate over `DataArray`s, imitating numpy's flat iterator. For a DataArray `da`, I implemented a flat iterator that works exactly like `da.values.flat`, but returns a singelton `DataArray` that has all the coordinates and meta data and whatnot. I wrote it because I needed it for something and thought it would be useful for others too. I'd love to hear your opinions - if you think it's useful I'll write up some unittests. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3054/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 648047992,MDExOlB1bGxSZXF1ZXN0NDQxOTIzODMx,4188,Fix typo in error message in plot.py,6164157,closed,0,,,1,2020-06-30T10:08:26Z,2020-06-30T11:35:21Z,2020-06-30T11:35:21Z,CONTRIBUTOR,,0,pydata/xarray/pulls/4188,Fix typo in error message in plot.py,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4188/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 545624732,MDExOlB1bGxSZXF1ZXN0MzU5NDU5Njcy,3663,Typo in Universal Functions section,6164157,closed,0,,,1,2020-01-06T09:22:25Z,2020-01-06T11:41:51Z,2020-01-06T11:41:42Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3663," - [ ] Closes #xxxx - [ ] Tests added - [ ] Passes `black . && mypy . && flake8` - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3663/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 340069538,MDExOlB1bGxSZXF1ZXN0MjAwNTcxMjI1,2277,ENH: Scatter plots of one variable vs another,6164157,closed,0,,,45,2018-07-11T02:31:01Z,2019-08-08T18:05:00Z,2019-08-08T15:57:17Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2277," - [x] Closes #470 - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API - [x] Add support for `size`? - [x] Revert hue=datetime support bits Say you have two variables in a `Dataset` and you want to make a scatter plot of one vs the other, possibly using different hues and/or faceting. This is useful if you want to inspect the data to see whether two variables have some underlying relationships between them that you might have missed. It's something that I found myself manually writing the code for quite a few times, so I thought it would be better to have it as a feature. I'm not sure if this is actually useful for other people, but I have the feeling that it probably is. First, set up dataset with two variables: ```python import xarray as xr import numpy as np import matplotlib from matplotlib import pyplot as plt A = xr.DataArray(np.zeros([3, 11, 4, 4]), dims=[ 'x', 'y', 'z', 'w'], coords=[np.arange(3), np.linspace(0,1,11), np.arange(4), 0.1*np.random.randn(4)]) B = 0.1*A.x**2+A.y**2.5+0.1*A.z*A.w A = -0.1*A.x+A.y/(5+A.z)+A.w ds = xr.Dataset({'A':A, 'B':B}) ds['w'] = ['one', 'two', 'three', 'five'] ``` Now, we can plot all values of `A` vs all values of `B`: ```python plt.plot(A.values.flat,B.values.flat,'.') ``` ![a](https://user-images.githubusercontent.com/6164157/42546655-4cce84d8-848c-11e8-8ae0-9249e04137bd.png) What a mess. Wouldn't it be nice if you could color each point according to the value of some coordinate, say `w`? ```python ds.scatter(x='A',y='B', hue='w') ``` ![a](https://user-images.githubusercontent.com/6164157/42546725-9810e4c2-848c-11e8-827d-ae98c57f0ad0.png) Huh! There seems to be some underlying structure there. Can we also facet over a different coordinate? ```python ds.scatter(x='A',y='B',col='x', hue='w') ``` ![a](https://user-images.githubusercontent.com/6164157/42546773-d590caf6-848c-11e8-8095-06216f138a95.png) or two coordinates? ```python ds.scatter(x='A',y='B',col='x', row='z', hue='w') ``` ![a](https://user-images.githubusercontent.com/6164157/42546775-e07a8b96-848c-11e8-98f2-8a05d543b54a.png) The logic is that dimensions that are not faceted/hue are just stacked using `xr.stack` and plotted. Only variables that have exactly the same dimensions are allowed. Regarding implementation -- I am certainly not sure about the API and I probably haven't thought about edge cases with missing data or nans or whatnot, so any input would be welcome. Also, there might be a simpler implementation by first using `to_array` and then using existing line plot functions, but I couldn't find it. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2277/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 3, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 460960338,MDExOlB1bGxSZXF1ZXN0MjkxOTgwNTUz,3046,typo in whats-new,6164157,closed,0,,,1,2019-06-26T13:07:47Z,2019-06-26T16:29:15Z,2019-06-26T15:35:52Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3046,Small typo.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3046/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 409305872,MDExOlB1bGxSZXF1ZXN0MjUyMzIwNTA4,2763,typo in whats_new,6164157,closed,0,,,1,2019-02-12T13:44:42Z,2019-02-12T17:41:54Z,2019-02-12T17:41:54Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2763,just a small typo,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2763/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 407523050,MDExOlB1bGxSZXF1ZXN0MjUwOTc4NzU1,2749,Fix name loss when masking,6164157,closed,0,,,5,2019-02-07T02:59:45Z,2019-02-12T01:46:51Z,2019-02-11T17:35:03Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2749," - [x] Closes #2457 #2748 - [x] Tests added - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API I took a simple-minded strategy to fix: just mask and then rename the result to `self.name`. This is a slight overkill since the renaming will be done on every masking, not just on the edge cases when it's needed, but this is really a very small computational cost and it's much easier and bulletproof.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2749/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 337015273,MDExOlB1bGxSZXF1ZXN0MTk4MzMwMTUx,2259,BUG: unnamed args in faceted line plots,6164157,closed,0,,,1,2018-06-29T14:14:02Z,2019-02-05T15:52:42Z,2018-07-04T17:06:55Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2259,"- [x] Closes #2248 (remove if there is no corresponding issue, which should only be the case for minor changes) - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) Fixed a syntax inconsistency, allowing to pass unnamed arguments to faceted line plots. Example code: ```python import xarray as xr import numpy as np np.random.seed(0) da = xr.DataArray(np.random.randn(3, 3, 3, 3), dims=['x', 'y', 'z', 'w'], coords=[range(3), [3.5, 4.9, 6.7], ['a','b','c'], ['foo', 'bar', 'foobar']], name='arr_name') da.plot.line('o--',row='y', col='w',hue='z') ``` ![sdojn](https://user-images.githubusercontent.com/6164157/42094867-0cde3d8e-7b7f-11e8-91e5-a9a9156955f4.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2259/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 342061692,MDExOlB1bGxSZXF1ZXN0MjAyMDUxNDcy,2296,DOC: replace broken link by a link to @shoyer's personal blog,6164157,closed,0,,,1,2018-07-17T19:55:21Z,2018-07-17T20:01:34Z,2018-07-17T20:01:28Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2296,"Closes #2295 (remove if there is no corresponding issue, which should only be the case for minor changes) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2296/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 336999871,MDExOlB1bGxSZXF1ZXN0MTk4MzE4MTQ5,2258,BUG: unnamed args in faceted line plots,6164157,closed,0,,,1,2018-06-29T13:30:54Z,2018-06-29T14:00:47Z,2018-06-29T13:59:12Z,CONTRIBUTOR,,0,pydata/xarray/pulls/2258," - [x] Closes #2248 (remove if there is no corresponding issue, which should only be the case for minor changes) - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) Fixed a syntax inconsistency, allowing to pass unnamed arguments to faceted line plots. ```python Example code: import xarray as xr import numpy as np np.random.seed(0) da = xr.DataArray(np.random.randn(3, 3, 3, 3), dims=['x', 'y', 'z', 'w'], coords=[range(3), [3.5, 4.9, 6.7], ['a','b','c'], ['foo', 'bar', 'foobar']], name='arr_name') da.plot.line('o--',row='y', col='w',hue='z') ``` ![sdojn](https://user-images.githubusercontent.com/6164157/42094867-0cde3d8e-7b7f-11e8-91e5-a9a9156955f4.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2258/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull