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/issues/4126#issuecomment-691635813,https://api.github.com/repos/pydata/xarray/issues/4126,691635813,MDEyOklzc3VlQ29tbWVudDY5MTYzNTgxMw==,6164157,2020-09-13T08:33:15Z,2020-09-13T08:33:15Z,CONTRIBUTOR,thanks @dcherian & @phausamann !,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,633516123
https://github.com/pydata/xarray/issues/4235#issuecomment-660595722,https://api.github.com/repos/pydata/xarray/issues/4235,660595722,MDEyOklzc3VlQ29tbWVudDY2MDU5NTcyMg==,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}",,659142025
https://github.com/pydata/xarray/issues/4126#issuecomment-640237600,https://api.github.com/repos/pydata/xarray/issues/4126,640237600,MDEyOklzc3VlQ29tbWVudDY0MDIzNzYwMA==,6164157,2020-06-07T15:41:13Z,2020-06-07T15:41:13Z,CONTRIBUTOR,calling @dcherian for the rescue!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,633516123
https://github.com/pydata/xarray/pull/3054#issuecomment-519932051,https://api.github.com/repos/pydata/xarray/issues/3054,519932051,MDEyOklzc3VlQ29tbWVudDUxOTkzMjA1MQ==,6164157,2019-08-09T14:04:57Z,2019-08-09T14:04:57Z,CONTRIBUTOR,"@crusaderky @corora Thanks for your comments, glad to see that there's a more efficient way to do it. The question is do you think it's useful enough to justify adding it as a built in function. I end up using my solution quite often","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,462049420
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')`:

but with the pull request we screw up the legend

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/issues/2791#issuecomment-471136862,https://api.github.com/repos/pydata/xarray/issues/2791,471136862,MDEyOklzc3VlQ29tbWVudDQ3MTEzNjg2Mg==,6164157,2019-03-09T02:14:53Z,2019-03-09T02:15:40Z,CONTRIBUTOR,"To make things concrete, the solution that I have in mind is as simple as adding this function to `DataArray`:
```python
def __format__(self, format_spec):
return self.values.__format__(format_spec)
```
Here's one use case I have encountered:
```python
ds=xr.Dataset({'A':(['x','y','z'], np.random.rand(40,40,3)),
'B':(['z'], np.random.randn(3))},
coords={'z':[31,42,45]})
fg=ds.A.plot(col='z')
for ax, d in zip(fg.axes.flat, fg.name_dicts.flat):
t=ax.get_title()
ax.set_title('{} and B(z)={:1.2}'.format(t, ds.sel(**d).B))
```
This way, if you want to vectorize a `__format__` on an array can you not simply do
```python
ar = xr.DataArray([39, 103, id(xr)])
print('{:3.3f} {:3.3e} {:x}'.format(*ar))
#prints `39.000 1.030e+02 10e5bb548`
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,415209776
https://github.com/pydata/xarray/issues/2791#issuecomment-470801183,https://api.github.com/repos/pydata/xarray/issues/2791,470801183,MDEyOklzc3VlQ29tbWVudDQ3MDgwMTE4Mw==,6164157,2019-03-08T04:30:22Z,2019-03-08T04:30:22Z,CONTRIBUTOR,"I tend towards the former, to coerce singleton arrays to behave as scalars of their `dytpe`. I think it makes more sense in terms of use cases (at least everything that I needed). I don't mind implementing it if there is agreement as to which of the two to do.
> These behaviors would definitely conflict for scalar objects -- in the second case, we would still want to include some indication that it's an `xarray.DataArray`. NumPy doesn't have a conflict because indexing an array results in a NumPy scalars, which prints like Python builtin scalars.
@shoyer I don't see why would that be the case. If I format something as `'{:04d} {:3.5e} {:2.3E}'.format(dataarray)` or whatnot, I would expect that the average user would expect to get `'0043 4.35000e+02 2.450E+02'` in return, without any indication that these are data arrays.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,415209776
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/issues/2791#issuecomment-469320419,https://api.github.com/repos/pydata/xarray/issues/2791,469320419,MDEyOklzc3VlQ29tbWVudDQ2OTMyMDQxOQ==,6164157,2019-03-04T16:35:09Z,2019-03-04T16:35:44Z,CONTRIBUTOR,"On the one hand I agree, but note that the same behavior works for numpy arrays
```python
import numpy as np
a=np.array([1,2,3,4])
' '.join('{:d}'.format(v) for v in a)
# prints '1 2 3 4'
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,415209776
https://github.com/pydata/xarray/pull/2749#issuecomment-462342581,https://api.github.com/repos/pydata/xarray/issues/2749,462342581,MDEyOklzc3VlQ29tbWVudDQ2MjM0MjU4MQ==,6164157,2019-02-11T14:17:04Z,2019-02-11T14:17:04Z,CONTRIBUTOR,@shoyer your fix works. 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}",,407523050
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/2749#issuecomment-461542452,https://api.github.com/repos/pydata/xarray/issues/2749,461542452,MDEyOklzc3VlQ29tbWVudDQ2MTU0MjQ1Mg==,6164157,2019-02-07T18:27:41Z,2019-02-07T18:27:41Z,CONTRIBUTOR,"I agree that my solution is a bit hacky, but from a computational cost viewpoint they are identical (or almost. I don't think there's a way to avoid one if statement per call of `where`). I thought my solution is good because catching this at a high level captures all possible edge cases that we might miss at lower ones. But I can try to do what you suggested to.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,407523050
https://github.com/pydata/xarray/issues/2748#issuecomment-461272175,https://api.github.com/repos/pydata/xarray/issues/2748,461272175,MDEyOklzc3VlQ29tbWVudDQ2MTI3MjE3NQ==,6164157,2019-02-07T03:02:11Z,2019-02-07T03:02:11Z,CONTRIBUTOR,"@dcherian here: #2749. I think it's very simple, but I might be missing something","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,407085814
https://github.com/pydata/xarray/issues/2743#issuecomment-461099660,https://api.github.com/repos/pydata/xarray/issues/2743,461099660,MDEyOklzc3VlQ29tbWVudDQ2MTA5OTY2MA==,6164157,2019-02-06T16:56:46Z,2019-02-06T16:56:46Z,CONTRIBUTOR,OK. So no point in fixing this. Thanks.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,406615454
https://github.com/pydata/xarray/issues/2743#issuecomment-461091457,https://api.github.com/repos/pydata/xarray/issues/2743,461091457,MDEyOklzc3VlQ29tbWVudDQ2MTA5MTQ1Nw==,6164157,2019-02-06T16:35:46Z,2019-02-06T16:35:46Z,CONTRIBUTOR,"OK I think I know what's going on. On a fresh environment it works, but then I installed `ipykernel` so that I could fiddle around on `Jupyter` and after that it doesn't work anymore. I don't know if it's of interest to try to fix this or not, I'll let you decide.
Here are the package changes when installing `ipykernel`
```bash
(test_env)$ conda install ipykernel
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /Users/yohai/miniconda3/envs/test_env
added / updated specs:
- ipykernel
The following NEW packages will be INSTALLED:
ipykernel conda-forge/osx-64::ipykernel-5.1.0-py37h24bf2e0_1002
jupyter_client conda-forge/noarch::jupyter_client-5.2.4-py_1
jupyter_core conda-forge/noarch::jupyter_core-4.4.0-py_0
libsodium conda-forge/osx-64::libsodium-1.0.16-h1de35cc_1001
pyzmq conda-forge/osx-64::pyzmq-17.1.2-py37h111632d_1001
zeromq conda-forge/osx-64::zeromq-4.2.5-h0a44026_1006
The following packages will be UPDATED:
expat conda-forge::expat-2.2.5-h0a44026_1002 --> pkgs/main::expat-2.2.6-h0a44026_0
libpq conda-forge::libpq-10.6-hbe1e24e_1000 --> pkgs/main::libpq-11.1-h051b688_0
openssl 1.0.2p-h1de35cc_1002 --> 1.1.1a-h1de35cc_1000
pcre conda-forge::pcre-8.41-h0a44026_1003 --> pkgs/main::pcre-8.42-h378b8a2_0
postgresql conda-forge::postgresql-10.6-ha1bbaa7~ --> pkgs/main::postgresql-11.1-h051b688_0
python conda-forge::python-3.7.1-h145921a_10~ --> pkgs/main::python-3.7.2-haf84260_0
The following packages will be SUPERSEDED by a higher-priority channel:
cryptography conda-forge::cryptography-2.5-py37hdb~ --> pkgs/main::cryptography-2.4.2-py37ha12b0ac_0
curl conda-forge::curl-7.63.0-heae2a1f_1000 --> pkgs/main::curl-7.63.0-ha441bb4_1000
krb5 conda-forge::krb5-1.16.3-h24a3359_1000 --> pkgs/main::krb5-1.16.1-hddcf347_7
libcurl conda-forge::libcurl-7.63.0-h76de61e_~ --> pkgs/main::libcurl-7.63.0-h051b688_1000
libgdal conda-forge::libgdal-2.4.0-h89caebc_1~ --> pkgs/main::libgdal-2.3.3-h0950a36_0
The following packages will be DOWNGRADED:
libssh2 1.8.0-hf30b1f0_1003 --> 1.8.0-1
rasterio 1.0.13-py37h3683dd5_1 --> 1.0.13-py37h54a03ab_0
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,406615454
https://github.com/pydata/xarray/issues/2743#issuecomment-460902330,https://api.github.com/repos/pydata/xarray/issues/2743,460902330,MDEyOklzc3VlQ29tbWVudDQ2MDkwMjMzMA==,6164157,2019-02-06T05:05:00Z,2019-02-06T05:05:00Z,CONTRIBUTOR,"Works fine. Thanks. It does suggest there's a problem though, no? Why are there two separate environment specs?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,406615454
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')
```

Specifying `hue` creates a colorbar:
```python
ds.plot.scatter(x='A',y='B', hue='z')
```

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')
```

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)
```

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)
```


","{""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/2258#issuecomment-401363180,https://api.github.com/repos/pydata/xarray/issues/2258,401363180,MDEyOklzc3VlQ29tbWVudDQwMTM2MzE4MA==,6164157,2018-06-29T14:00:46Z,2018-06-29T14:00:46Z,CONTRIBUTOR,"Sorry, I messed this up. Opening a new fresh pull request","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,336999871
https://github.com/pydata/xarray/pull/2104#issuecomment-396235110,https://api.github.com/repos/pydata/xarray/issues/2104,396235110,MDEyOklzc3VlQ29tbWVudDM5NjIzNTExMA==,6164157,2018-06-11T13:01:21Z,2018-06-11T13:01:21Z,CONTRIBUTOR,"@fujiisoup Great feature! thanks.
There's a typo ('rondomloy') in the documentation: https://github.com/pydata/xarray/blame/master/doc/interpolation.rst#L192
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320275317
https://github.com/pydata/xarray/pull/2107#issuecomment-394058188,https://api.github.com/repos/pydata/xarray/issues/2107,394058188,MDEyOklzc3VlQ29tbWVudDM5NDA1ODE4OA==,6164157,2018-06-02T04:47:05Z,2018-06-02T04:47:05Z,CONTRIBUTOR,"OK, somehow the rebasing thing broke everything and I am at a loss. @shoyer, @dcherian please guide me on how to proceed. Sorry.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-393897686,https://api.github.com/repos/pydata/xarray/issues/2107,393897686,MDEyOklzc3VlQ29tbWVudDM5Mzg5NzY4Ng==,6164157,2018-06-01T14:27:48Z,2018-06-01T14:27:48Z,CONTRIBUTOR,"Thanks @shoyer. I fixed everything except for the coverall part, which is weird. The lines it marks as untested are the function `_line_facetgrid`, which the main function that performs all of the testing. I suspect that it simply doesn't run my new tests for some reason. When I run `pytest` locally these lines do get tested (I verified by adding `print` commands there).
Should I add decorators like `pytest.mark.something`for coverall to notice these tests?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-393018032,https://api.github.com/repos/pydata/xarray/issues/2107,393018032,MDEyOklzc3VlQ29tbWVudDM5MzAxODAzMg==,6164157,2018-05-30T03:22:16Z,2018-05-30T03:22:16Z,CONTRIBUTOR,"I wrote some tests and also followed @shoyer's suggestion to make the plots look more like seaborn. Here's what it looks like now:



I also had to refactor the code adding legend to a line plot to avoid duplicities.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-388635575,https://api.github.com/repos/pydata/xarray/issues/2107,388635575,MDEyOklzc3VlQ29tbWVudDM4ODYzNTU3NQ==,6164157,2018-05-13T15:34:39Z,2018-05-13T15:34:39Z,CONTRIBUTOR,"@jhamman @shoyer Sorry for being a noob, but what exactly do you mean by ""add some basic unit tests""? you mean writing new functions that will verify that stuff works as it should, or that the new addition does not mess up previous plotting behavior?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-387196472,https://api.github.com/repos/pydata/xarray/issues/2107,387196472,MDEyOklzc3VlQ29tbWVudDM4NzE5NjQ3Mg==,6164157,2018-05-07T20:33:19Z,2018-05-07T20:33:19Z,CONTRIBUTOR,was simpler than I thought. @shoyer I added the plots.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-386922376,https://api.github.com/repos/pydata/xarray/issues/2107,386922376,MDEyOklzc3VlQ29tbWVudDM4NjkyMjM3Ng==,6164157,2018-05-06T22:40:43Z,2018-05-07T20:31:19Z,CONTRIBUTOR,"Example code to demonstrate functionality:
```python
import xarray as xr
import numpy as np
import pandas as pd
np.random.seed(0)
tm = pd.date_range('2000-01-01', end='2000-01-02', freq='H')
d4 = xr.DataArray(np.random.randn(len(tm), 6, 3, 3),
dims=['time', 'x', 'text_dim', 'z'],
coords=[tm, range(6), ['foo', 'bar', 'foobar'], [3.5, 4.9, 6.7]],
name='arr_name')
d3 = d4[..., 0].drop('z')
d2 = d3[..., 0].drop('text_dim')
# generate a faceted 4-dimensional plot:
d4.plot(hue='text_dim', col='x', row='z')
# or equivalently:
# d4.plot.line(x='time', col='x', row='z')
````

````python
d3.plot(col='x', row='text_dim')
````

````python
d2.plot(hue='x')
````

````python
d3.plot.line(col='x', col_wrap=3, hue='text_dim')
````

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/pull/2107#issuecomment-387174940,https://api.github.com/repos/pydata/xarray/issues/2107,387174940,MDEyOklzc3VlQ29tbWVudDM4NzE3NDk0MA==,6164157,2018-05-07T19:24:12Z,2018-05-07T19:24:12Z,CONTRIBUTOR,I found some bugs. I'll reopen when I fix them.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,320632674
https://github.com/pydata/xarray/issues/2084#issuecomment-386922610,https://api.github.com/repos/pydata/xarray/issues/2084,386922610,MDEyOklzc3VlQ29tbWVudDM4NjkyMjYxMA==,6164157,2018-05-06T22:44:56Z,2018-05-06T22:44:56Z,CONTRIBUTOR,"Created a pull request: https://github.com/pydata/xarray/pull/2107
This is my first time contributing to an open-source project so be gentle. Any feedback will be appreciated.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,317853953
https://github.com/pydata/xarray/issues/2084#issuecomment-384670467,https://api.github.com/repos/pydata/xarray/issues/2084,384670467,MDEyOklzc3VlQ29tbWVudDM4NDY3MDQ2Nw==,6164157,2018-04-26T14:54:38Z,2018-04-26T14:54:38Z,CONTRIBUTOR,@shoyer I can try to work on it and already tried to dig through the code to see how it can be done. If I commit to doing that then (a) it'll take time and (b) I'll probably bug you to help me...,"{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,317853953