Open guidocioni opened 1 year ago
I am bringing up this request since I have been facing the same issue. For what it is worth, I have posted a very similar issue with some kind of workaround, but probably on the wrong github repository. See
https://github.com/xarray-contrib/xarray-tutorial/issues/231#issue-2054820249
What is your issue?
I'm trying to produce a facet plot which contains maps with different overlaid layers (e.g. a
pcolormesh
andstreamplot
). At the moment I'm creating the plot and then iterating over the axes to add the plots manuallayThis is far from optimal and doesn't really look clean to me. Also, I'm not entirely sure the order of
p.axes.flat
correspond to the one of theexp
dimension I'm using to facet.All examples in the doc (https://docs.xarray.dev/en/stable/user-guide/plotting.html) refer to the
plot
method ofDataArray
, so it seems that, once created thep
object, no other variable from the dataset can be accessed.However, on the doc it is mentioned
It is not clear to me whether the
xarray.plot.FacetGrid.map
method can indeed be used to plot another dataset variable or not. If that's not the case, is there any way to achieve what I'm doing without manually looping through the axes?