-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
HoloViews based plotting API #2199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like a good use case for accessors. The syntax could then be: |
Very cool! I also think this would be a good use case for a new accessor, perhaps An |
Thanks for the feedback! I'll try to drive the pandas conversation along, but since I doubt that will be resolved in the near term so I think until then we should definitely pursue the accessor approach (which is much better than the property monkey patching we're doing now). Personally I'd prefer @rabernat Since you have used HoloViews with xarray in the past I'd very appreciate your input as well. |
I am a big fan of holoviews and have been using it extensively for my own work in recent months. So obviously I am a big 👍 on this integration. I agree the accessor is the best option for now, but I have no strong opinions about the name of the accessor. Some features I would like to see are things that go beyond the plotting capabilities associated with the matplotlib engine. For example:
|
Oh and another big 👍 to the datashader integration. This is crucial for my datasets. |
Okay thanks, given xarray's preference for accessor names to match projects I'm now leaning toward
HoloPlot explicitly does not deal with da.holoplot(x='lon', y='lat', kind='image')
That should happen automatically.
You can facet in a number of ways: da.isel(time=slice(0, 3)).holoplot(x='lon', y='lat', kind='image', by='time') will produce three subplots which are linked on the x- and y-axis, i.e. zooming on one will zoom on all unless you set da.isel(time=slice(0, 3)).holoplot(x='lon', y='lat', kind='image', row='time', col='some_other_coord')
This is also already supported, the API here is: ds.holoplot(x='lon', y='lat', z=['air', 'surface']) Will provide a widget to select between the 'air' and 'surface' data variable.
Currently working on that, it's basically just waiting on new HoloViews/GeoViews releases. The API here is as follows: air_ds.air.holoplot.quadmesh(
'lon', 'lat', ['air', 'some_other_variable'], crs=ccrs.PlateCarree(), projection=ccrs.Orthographic(-80, 30),
global_extent=True, width=600, height=500, cmap='viridis'
) * gv.feature.coastline |
Actually I suppose that's not what it would be, it could be |
I'm not strongly opposed to something like
|
Thanks again for the feedback, I've decided to go with |
Thanks for everyone's feedback, due to trademark concerns we decided to rename both the library and the API to |
As part of a recent project we have been working on a plotting API for a number of projects including pandas and xarray called HoloPlot. You can see some examples using the API with xarray here. As the name suggests it is built on HoloViews and is meant as an alternative for the native plotting API that closely mirrors but does not necessarily match those APIs exactly. The main differences are:
The main question I'd like to put to the xarray community is how we should best expose this API. In pandas there has been some discussion to add a configurable
engine
for the plotting API letting you switch between different plotting implementations (see pandas-dev/pandas#14130). The approach we started with was to clobber theDataArray.plot
API entirely, which I now consider to obtrusive and likely to interfere with existing workflows. The alternative approaches we considered:DataArray.hvplot
,DataArray.hplot
orDataArray.holoplot
DataArray.plot
but add anengine
keyword to toggle between the original and HoloPlot API.engine
keyword)I'd love to hear what xarray maintainers and users think would be the best approach here.
The text was updated successfully, but these errors were encountered: