You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in adding the ability to plot surface plots of 2D xarray data using matplotlib's 3D plotting function plot_surface().
This would be nice because a surface in 3D is much more useful for showing certain features of 2D data then color plots are. For example an outlier would appear as an obvious spike rather than just a single bright point as it would when using plot.imshow(). I'm not suggesting adding full 3D plotting capability, just the ability to visualise 2D data as a surface in 3D.
The code would end up allowing you to just call xr.Dataarray.plot.surface() to create something like this example from here (code here):
Obviously xarray would be used to automatically set the axes labels and title and so on.
As far as I can tell it wouldn't be too difficult to do, it would just be implemented as another 2D plotting method the same way as the Dataarray.plot.imshow(), Dataarray.plot.contour() etc methods currently are. It would require the imports
but these would only need to be imported if this type of plot was chosen.
I would be interested in trying to add this myself, but I've never contributed to an open-source project before. Is this a reasonable thing for me to try? Can anyone see any immediate difficulties with this? Would I just need to have a go and then submit a pull request?
The text was updated successfully, but these errors were encountered:
Sure, this seems like a pretty reasonable feature addition to me. One thing to consider is that this will need to be a bit of a special case compared to other 2D plots in xarray, because the axes are now in 3D. For example, I'm pretty sure faceting wouldn't work. Otherwise it would be best to make methods as consistent with other plotting methods as possible.
I am interested in adding the ability to plot surface plots of 2D xarray data using matplotlib's 3D plotting function
plot_surface()
.This would be nice because a surface in 3D is much more useful for showing certain features of 2D data then color plots are. For example an outlier would appear as an obvious spike rather than just a single bright point as it would when using
plot.imshow()
. I'm not suggesting adding full 3D plotting capability, just the ability to visualise 2D data as a surface in 3D.The code would end up allowing you to just call
xr.Dataarray.plot.surface()
to create something like this example from here (code here):Obviously xarray would be used to automatically set the axes labels and title and so on.
As far as I can tell it wouldn't be too difficult to do, it would just be implemented as another 2D plotting method the same way as the
Dataarray.plot.imshow()
,Dataarray.plot.contour()
etc methods currently are. It would require the importsbut these would only need to be imported if this type of plot was chosen.
I would be interested in trying to add this myself, but I've never contributed to an open-source project before. Is this a reasonable thing for me to try? Can anyone see any immediate difficulties with this? Would I just need to have a go and then submit a pull request?
The text was updated successfully, but these errors were encountered: