html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/2277#issuecomment-519625567,https://api.github.com/repos/pydata/xarray/issues/2277,519625567,MDEyOklzc3VlQ29tbWVudDUxOTYyNTU2Nw==,6164157,2019-08-08T18:01:03Z,2019-08-08T18:01:03Z,CONTRIBUTOR,"Thanks @dcherian ! Glad to see this finally merged","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-518430365,https://api.github.com/repos/pydata/xarray/issues/2277,518430365,MDEyOklzc3VlQ29tbWVudDUxODQzMDM2NQ==,6164157,2019-08-05T22:51:00Z,2019-08-05T22:51:00Z,CONTRIBUTOR,"Thanks for this On Mon, Aug 5, 2019 at 12:04 PM Deepak Cherian wrote: > Yay, tests pass. I'll merge in a few days (cc @pydata/xarray > , @yohai > ) > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . > -- Yohai Bar Sinai Post Doctoral Fellow John A. Paulson School of Engineering and Applied Sciences Harvard University ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-505053133,https://api.github.com/repos/pydata/xarray/issues/2277,505053133,MDEyOklzc3VlQ29tbWVudDUwNTA1MzEzMw==,6164157,2019-06-24T15:11:03Z,2019-06-24T15:11:03Z,CONTRIBUTOR,@dcherian @shoyer I think it's ready to merge,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-504280891,https://api.github.com/repos/pydata/xarray/issues/2277,504280891,MDEyOklzc3VlQ29tbWVudDUwNDI4MDg5MQ==,6164157,2019-06-21T04:04:10Z,2019-06-21T04:04:10Z,CONTRIBUTOR,turns out it was an easy fix. But now I wonder if we somehow screwed up other plotting functionalities without noticing (I checked a few but found nothing),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-504276488,https://api.github.com/repos/pydata/xarray/issues/2277,504276488,MDEyOklzc3VlQ29tbWVudDUwNDI3NjQ4OA==,6164157,2019-06-21T03:35:49Z,2019-06-21T03:36:43Z,CONTRIBUTOR,"Hold the press! we can't merge. It seems like the new functionality messes up the faceted lineplots. If we define `ds=xr.tutorial.scatter_example_dataset()` then current behavior is : `ds.A.plot(col='x', row='w', hue='z')`: ![a](https://user-images.githubusercontent.com/6164157/59895820-03e13d00-93b4-11e9-9bbd-7f4d7cb4b386.png) but with the pull request we screw up the legend ![b](https://user-images.githubusercontent.com/6164157/59895833-13608600-93b4-11e9-9c3b-7b85053bf2ac.png) I need to look at this. Also - kinda unsettling that this was not picked up by any unit test.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-504118360,https://api.github.com/repos/pydata/xarray/issues/2277,504118360,MDEyOklzc3VlQ29tbWVudDUwNDExODM2MA==,6164157,2019-06-20T17:43:14Z,2019-06-20T17:43:14Z,CONTRIBUTOR,@dcherian @shoyer I can't seem to build the docs on my machine because of cartopy or something. Is there a way to access a built version from travis or something like that?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-504094593,https://api.github.com/repos/pydata/xarray/issues/2277,504094593,MDEyOklzc3VlQ29tbWVudDUwNDA5NDU5Mw==,6164157,2019-06-20T16:30:29Z,2019-06-20T17:07:55Z,CONTRIBUTOR,"I'll try to have a look tonight On Thu, Jun 20, 2019, 11:30 Stephan Hoyer wrote: > Tests seem to be failing due to lint errors, see #2277 (comment) > > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . > ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-504054857,https://api.github.com/repos/pydata/xarray/issues/2277,504054857,MDEyOklzc3VlQ29tbWVudDUwNDA1NDg1Nw==,6164157,2019-06-20T14:46:14Z,2019-06-20T14:46:14Z,CONTRIBUTOR,Anything I can do?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-469527459,https://api.github.com/repos/pydata/xarray/issues/2277,469527459,MDEyOklzc3VlQ29tbWVudDQ2OTUyNzQ1OQ==,6164157,2019-03-05T03:56:52Z,2019-03-05T03:56:52Z,CONTRIBUTOR,"> Could we call this `mark_size` instead of `scatter_size`? The later sounds a little awkward to me. I think [matplotlib uses `markersize`](https://matplotlib.org/api/_as_gen/matplotlib.lines.Line2D.html?highlight=markersize#matplotlib.lines.Line2D.get_markersize)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-462211091,https://api.github.com/repos/pydata/xarray/issues/2277,462211091,MDEyOklzc3VlQ29tbWVudDQ2MjIxMTA5MQ==,6164157,2019-02-11T03:28:06Z,2019-02-11T03:40:25Z,CONTRIBUTOR,"My feeling is that ""legend"" applies to both a color bar and a discrete legend (or other more complicated stuff too) but I am not a native English speaker. I'm fine with whichever decision.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-460506195,https://api.github.com/repos/pydata/xarray/issues/2277,460506195,MDEyOklzc3VlQ29tbWVudDQ2MDUwNjE5NQ==,6164157,2019-02-05T04:09:49Z,2019-02-05T04:13:35Z,CONTRIBUTOR,"This looks great! Thanks @dcherian! The only comment I have is with respect to the part of the API that specifies whether a legend should be drawn or not. For non-numerical hues (or when `hue_style='discrete'`) the legend is turned off by `add_legend=False` but for numerical ones by `add_colorbar=False`, which might be not intuitive and might require manual editing in various places if you change your mind between a discrete and continuous legend. I would suggest to either unify both options to one, or make them interchangeable (if not contradicting). something like: ```python if xor(add_legend, add_colorbar): #decide according to plot type: if it's non-numeric or `hue_style='discrete'` # then use value of add_legend, else use value of add_colorbar elif add_legend or add_colorbar: #plot legend according to current logic ``` but really there should only be one allowable keyword here I think","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-439954393,https://api.github.com/repos/pydata/xarray/issues/2277,439954393,MDEyOklzc3VlQ29tbWVudDQzOTk1NDM5Mw==,6164157,2018-11-19T16:28:11Z,2018-11-19T16:28:11Z,CONTRIBUTOR,"@dcherian thanks for nudging. Actually I'm in a pretty stressed time now. I will be able to pick this up in a few months, but I wouldn't mind if someone else does it in the meantime (I don't think there's a lot of work there) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-407076380,https://api.github.com/repos/pydata/xarray/issues/2277,407076380,MDEyOklzc3VlQ29tbWVudDQwNzA3NjM4MA==,6164157,2018-07-23T14:25:17Z,2018-07-23T14:25:17Z,CONTRIBUTOR,"thanks @dcherian for the review. I'll fix the code when I get to it later this week, Regarding the size and marker style - I'm not sure it makes sense to duplicate this functionality. Is it not easier to stack the two data arrays into one, use `to_pandas` and then just use seaborn directly? The reason I started this PR in the first place is that I happened to do relatively simple scatter plots quite often, so I thought it'd be handy. but for more elaborate ones I would use a dedicated tool like seaborn.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-405447950,https://api.github.com/repos/pydata/xarray/issues/2277,405447950,MDEyOklzc3VlQ29tbWVudDQwNTQ0Nzk1MA==,6164157,2018-07-17T03:26:20Z,2018-07-17T03:26:20Z,CONTRIBUTOR,"I don't have an opinion about naming variables and would be happy with whatever decision y'all make. For the code -- I added tests and changed the logic a bit. Following @dcherian's suggestion, now the default behavior is no longer coloring hues with discrete values (legend) but rather with a continuous scale (colorbar). It does make actually more sense and I think it should also be the default behavior for regular line plots. This is the API now: ```python A = xr.DataArray(np.zeros([3, 20, 4, 4]), dims=[ 'x', 'y', 'z', 'w'], coords=[np.sort(np.random.randn(k)) for k in [3,20,4,4]]) ds=xr.Dataset({'A': A.x+A.y+A.z+A.w, 'B': -0.2/A.x-2.3*A.y-np.abs(A.z)**0.123+A.w**2}) ds.A.attrs['units'] = 'Aunits' ds.B.attrs['units'] = 'Bunits' ds.z.attrs['units'] = 'Zunits' ds.plot.scatter(x='A', y='B') ``` ![screen shot 2018-07-16 at 23 03 46](https://user-images.githubusercontent.com/6164157/42794393-864da27e-894c-11e8-85f9-64e4820e6999.png) Specifying `hue` creates a colorbar: ```python ds.plot.scatter(x='A',y='B', hue='z') ``` ![screen shot 2018-07-16 at 23 05 03](https://user-images.githubusercontent.com/6164157/42794428-b4e79874-894c-11e8-9c55-c4de2df1d50d.png) If, however, the `hue` dimension is not numeric, then a legend is created: ```python ds['z']= ['who', 'let','dog','out'] ds.plot.scatter(x='A',y='B', hue='z') ``` ![screen shot 2018-07-16 at 23 19 42](https://user-images.githubusercontent.com/6164157/42794763-bcd990d0-894e-11e8-9a46-bff82d1d14b0.png) If you want a discrete legend even for numeric `hue`s, you can specify it explicitly: ```python ds.plot.scatter(x='A',y='B', hue='w', discrete_legend=True) ``` ![screen shot 2018-07-16 at 23 24 36](https://user-images.githubusercontent.com/6164157/42794911-6fdf735c-894f-11e8-961f-8cfef2415a9b.png) I am a bit bothered by the fact that this is not only a different coloring method, it's a very different style altogether (under the hood using `plot` instead of `scatter`). I don't know if it's a good thing or a bad thing that the same function can produce very different looking figures. Input will be welcome about that. Of course, faceting works as you think it should: ```python ds.plot.scatter(x='A',y='B', hue='z',col='x') ds.plot.scatter(x='A',y='B', hue='w',col='x', col_wrap=2) ``` ![screen shot 2018-07-16 at 23 06 09](https://user-images.githubusercontent.com/6164157/42794454-e296b296-894c-11e8-9af4-0ad9c1624ff5.png) ![screen shot 2018-07-16 at 23 25 33](https://user-images.githubusercontent.com/6164157/42794939-9099057c-894f-11e8-90c9-4553f07ab854.png) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-404161728,https://api.github.com/repos/pydata/xarray/issues/2277,404161728,MDEyOklzc3VlQ29tbWVudDQwNDE2MTcyOA==,16011037,2018-07-11T13:05:26Z,2018-07-11T13:05:26Z,CONTRIBUTOR,"Could not review pull request. It may be too large, or contain no reviewable changes.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538 https://github.com/pydata/xarray/pull/2277#issuecomment-404024984,https://api.github.com/repos/pydata/xarray/issues/2277,404024984,MDEyOklzc3VlQ29tbWVudDQwNDAyNDk4NA==,16011037,2018-07-11T02:31:09Z,2018-07-11T02:31:09Z,CONTRIBUTOR,"Could not review pull request. It may be too large, or contain no reviewable changes.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340069538