Open tomchor opened 3 years ago
According to matplotlib
doc, ax.scatter
has an argument marker
to set the marker style. This can be done to add a new argument in _dsplot
and scatter
in xarray
, and leave the determination of marker styles to matplotlib
. A PR can be made if this is OK.
This definitely sounds okay by me. I'm trying to figure out on my own how to implement this, but these plotting functions are quite complicated with the decorators and the inferences and all! I haven't been able to make much sense of it unfortunately.
This can be done to add a new argument in
_dsplot
andscatter
inxarray
, and leave the determination of marker styles tomatplotlib
sure, that sounds good. PRs welcome!
I started working on this, and quickly ran into the obstacle of not being able to differentiate points according to marker style (at least in a single call to plt.scatter
), basically this https://github.com/matplotlib/matplotlib/issues/11155
Setting up several calls to plt.scatter
(one for each marker style and related set of points) seems like a terrible idea to me, so I guess adding a marker
argument would only make sense if the user wants to do it manually (several Dataset.plot.scatter
calls) for the same figure.
Pardon me if I've missed something, but from the docs and the issues raised it doesn't seem like anyone has proposed to add a marker type in
Dataset.plot.scatter
. From the docs it seems that right now you can organize points using hue and marker size. It would be nice to add marker type to the mix, and I imagine that it wouldn't too hard.The only issue I see is that there are a finite number of marker types by default, but that's no different from the finite number of colors in the default color wheel.
Thoughts?