-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Is your feature request related to a problem?
hue argument works for xr.plot.line() but there is no way to control in the function call the colormap.
Right now, one has to manually create an axis, modify its cycler and then pass the ax to the plot function.
Hence one cannot create the axis with the plot function there one cannot use the "size" argument of the plot function for example, and one has to manually pick the number of colorlevels needed :
fig,ax = plt.subplots(figsize=(8,5))
ds2plot = ...
ax.set_prop_cycle(cycler(color=plt.get_cmap('magma_r')(np.linspace(0.15, 1, len(ds2plot.time)))))
ds2plot.plot(y="altitude", hue = "time", ax =ax)
Describe the solution you'd like
ds2plot.plot(y="altitude", hue = "time", cmap="magma_r")
And why not colormap arguments (i.e min, max for the color coding like in my previous functioning example).
Describe alternatives you've considered
No response
Additional context
No response
lurgyman63