-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add support for opts in explorer #1159
Conversation
* WIP overlaying rasterized * Clean up * Add rasterize to check for categorical * Add test * Add version check * Update hvplot/converter.py Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com> --------- Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
* Add version check for test * commit
…explorer (#1146) * call param.objects() after super().__init__ * add tests * update the docs * update error message
* Add autorange option * Add small documentation about autorange --------- Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
I'm not sure to be convinced by this functionality, it seems to only cater to advanced users while it is likely a lot of explorer users are beginner hvPlot users (since it's a good way to access hvPlot's plotting API without having to learn dozens of parameters). I can easily imagine there will be a lot of users clicking on this generic If it's a feature that you believe would have unblocked you while working with the explorer, let's see how it could be adapted so that it's obvious it's for advanced usage. For instance, it's not uncommon for GUIs have advanced options that are made visible only after ticking a checkbox. Some text around the options widget would also help understand what kind of input you can provide, with an example. |
I don't view the explorer as just for beginners. I imagine it's for both beginners and advanced users, with advanced users eventually using it to quickly take a look at their files as others have described here (once CLI is designed and released) . One of the things users need to quickly take a look is adjusting the colorbar like this. I agree that additional text can be added to help the user out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR to be merged and released in hvPlot 0.9.0, in addition to my inline comments I'd add that:
- I'd suggest renaming the tab to
Advanced
and for this tab to be the last one. - I'd suggest adding text above the options input to indicate how to use it, what data it accepts (an example could help).
I've tried to run the explorer but the tabs don't show. Ah I realized just know this PR is not targeting main but another PR, something is broken.
df = self._data | ||
if len(df) > MAX_ROWS and not (self.kind in KINDS["stats"] or kwargs.get('rasterize') or kwargs.get('datashade')): | ||
df = df.sample(n=MAX_ROWS) | ||
self._layout.loading = True | ||
try: | ||
self._hvplot = _hvPlot(df)( | ||
kind=self.kind, x=self.x, y=y, by=self.by, groupby=self.groupby, **kwargs | ||
) | ||
).opts(**opts_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not the options to the converter directly? hvPlot has some special options handling given the backend configuration https://hvplot.holoviz.org/user_guide/Plotting_Extensions.html#plot-styling-options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware that was available, but from my experience, it's less robust, and not all opts are available.
Co-authored-by: Maxime Liquet <35924738+maximlt@users.noreply.github.com>
Co-authored-by: Maxime Liquet <35924738+maximlt@users.noreply.github.com>
Thanks for renaming the tab, I find that much clearer! The tooltip is also very useful. I need to think more about using |
As title says, allows using opts; very crude at the moment simply using dict, but it's still useful as an escape hatch.