UXARRAY / uxarray

Xarray-styled package for reading and directly operating on unstructured grid datasets following UGRID conventions
https://uxarray.readthedocs.io/
Apache License 2.0
139 stars 30 forks source link

Revisit Matplotlib Support for Plotting #840

Open philipc2 opened 3 days ago

philipc2 commented 3 days ago

839

rljacob commented 15 hours ago

What I think users want is uxarray --> matplotlib without going through holoviews. Can we do that?

rajeeja commented 15 hours ago

What I think users want is uxarray --> matplotlib without going through holoviews. Can we do that?

May be issue a warning or something that points the users towards holoviews, we use it because of xarray support, interactive and ability to large datasets and utilize dask..

rljacob commented 14 hours ago

Many climate use cases involve making figures from scripts so interactive is not a requirement.

philipc2 commented 8 hours ago

Many climate use cases involve making figures from scripts so interactive is not a requirement.

HoloViews isn't just used for interactive plots. It can be used with the Matplotlib backend to generate figures from scripts, as can be seen in #843

xylar commented 11 minutes ago

@philipc2, we working on MPAS (Model for Prediction Across Scales) visualization have found HoloViews to be pretty counterintuitive, hard to configure and hard to get to behave as we need it to. The interactivity is not something we take advantage of very often, so that isn't a plus for us. The lack full integration of cartopy and projections seems to be a big downside for us. In addition, HoloViews has a very different interface form matplotlib (so a big learning curve and porting cost) and and is separated by many levels of (often poorly documented) code from the associated matplotlib calls. While we can sometimes use HoloViews plot figures that are "good enough" for debugging purposes, we have not had much luck when we try to incorporate them into our automated analysis pipeline or to make publication-quality figures.

We are getting around this by writing our own code (planned for https://github.com/E3SM-Project/mosaic) to handle polygon collections directly with matplotlib and cartopy but not using HoloViews. Our plan is to develop this capability for a bit with MPAS meshes in mind but then to suggest it as an alternative approach for UXarray if and when we can demonstrate its success.