Skip to content
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

hvPlot Explorer issues #1190

Open
8 of 17 tasks
ahuang11 opened this issue Nov 2, 2023 · 9 comments
Open
8 of 17 tasks

hvPlot Explorer issues #1190

ahuang11 opened this issue Nov 2, 2023 · 9 comments
Labels
explorer type: bug Something isn't working
Milestone

Comments

@ahuang11
Copy link
Collaborator

ahuang11 commented Nov 2, 2023

These things make the explorer unintuitive to use:

Minor

  • Rot needs a better label
  • Clim could be renamed to Colorbar limits?
  • Tiles should be possible to activate without geo=True
  • "Live update" widget isn't aligned well

Medium

  • Null value isn't visible in a Multiselect widget, so once a value has been selected, it's not intuitive how to go back to unselected (which is Command-click on Mac)
  • Remove unsupported datashader aggregate option of count for gridded
  • Color widget should be disabled for gridded, since it does not apply
  • When showing an error, mention that the plot will not update properly until the error message is corrected

Major

  • By is unintuitive and often doesn't work with groupby (add a tooltip toexplain what it is, and/or switch to using groupby + a radio button to select overlay, layout, widget, or color, and/or enforce value on by needed for groupby or vice versa)

TBD

  • Widget_location for HoloMap/DynamicMap uses up screen space, but holoviews pane does not support column
  • Two time(s) in the fields list: 'time' and "['time']"
  • Groupby should be None instead
  • Height / width doesn't do anything
  • Cartopy needs installed or else everything breaks silently; need to catch all such errors to avoid locking UI

Discussion needed

  • Frame wise / axis wise option

Out of scope in hvPlot

  • Infer color label from dataset (right now colorbar has no text label even though the dataset declares that dimension; explicitly filling in "Temp" works on clabel)
  • Bokeh invalid tooltip (e.g. for "HoloViews .opts()" under Advanced, the tooltip disappears permanently after entering invalid input

Credits to @jbednar for discovering these.

@ahuang11 ahuang11 added the TRIAGE label Nov 2, 2023
@jbednar
Copy link
Member

jbednar commented Nov 2, 2023

For reference, I was able to demonstrate each of these issues using this code on a machine without Cartopy installed (i.e., an environment with hvPlot but without GeoViews):

import hvplot.xarray, xarray as xr, holoviews as hv
hv.extension("bokeh", width=100)

ds = xr.tutorial.open_dataset('air_temperature').load()

hvplot.explorer(ds, x="lon", y="lat")
image

Notice the small size of the plot relative to the page width, which is why the horizontal placement of the HoloMap/DynamicMap widgets is a problem. For different zoom levels and browser widths the issue gets much worse; I think we really need to be reserving much more of the screen real estate for the plot:

image

@maximlt
Copy link
Member

maximlt commented Nov 6, 2023

General comment on naming things, I definitely want the name of the parameters passed to hvplot.<method> appear in the explorer as I strongly believe the explorer is a good way to discover and learn hvPlot's (and Pandas' to some extent) API. It's for example the best way to understand the difference between by and groupby, just by playing around with the options. So their actual names must be shown in the UI.

Two time(s) in the fields list: 'time' and "['time']"

I've seen this issue with a dev release of Param, just make sure to reproduce it with Param 2.0.

@jbednar
Copy link
Member

jbednar commented Nov 7, 2023

So their actual names must be shown in the UI.

I believe there is an open issue about the name of "by" vs "groupby", and I agree that changes in the Explorer should be coordinated with changes in the API. I continue to find the naming of those two options highly confusing.

@maximlt
Copy link
Member

maximlt commented Nov 8, 2023

I think this is the issue you're referring to: #157.

Note that I just referred to by and groupby as an example, my comment applies to all the parameters exposed by the explorer.

@ahuang11
Copy link
Collaborator Author

ahuang11 commented Nov 8, 2023

I definitely want the name of the parameters passed to hvplot. appear in the explorer as I strongly believe the explorer is a good way to discover and learn hvPlot's

Perhaps we can keep the original parameter names by using label like:

"Colorbar Limit (clim)"

@maximlt
Copy link
Member

maximlt commented Nov 9, 2023

Yes that works for me!

@ahuang11
Copy link
Collaborator Author

ahuang11 commented Nov 11, 2023

After trying to add framewise, I realize it may not be ideal for explorer because it requires dynamic=False and if there's 2320 frames in the plot, it takes a while to load.

I also discovered that axiswise is not implemented as a kwarg i.e. .hvplot(axiswise=True) is invalid.

This was referenced Nov 12, 2023
@ahuang11
Copy link
Collaborator Author

ahuang11 commented Nov 12, 2023

Regarding:

  • Infer color label from dataset (right now colorbar has no text label even though the dataset declares that dimension; explicitly filling in "Temp" works on clabel)

It seems that HoloViews doesn't automatically label colorbar so I think that's an issue for HoloViews: holoviz/holoviews#5982

import hvplot.xarray
import xarray as xr
import holoviews as hv
hv.extension("bokeh")

ds = xr.tutorial.open_dataset("air_temperature").isel(time=0)
hv.Image(ds, ["lon", "lat"], ["air"]).opts(colorbar=True).redim.label(lat="Latitude", lon="Longitude", air="Air Temperature")
image

@ahuang11
Copy link
Collaborator Author

  • Bokeh invalid tooltip (e.g. for "HoloViews .opts()" under Advanced, the tooltip disappears permanently after entering invalid input

I believe this is a Panel issue: holoviz/panel#5857

import param
import panel as pn
pn.extension()

class Test(param.Parameterized):

    d = param.Dict(doc="This should not disappear")

pn.Param(Test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explorer type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants