holoviz / holoviz/hvplot

Enhance plot method docstrings with additional generic plot options

Open
#1,551 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

When used in an IDE like VS Code, users don't get any useful information when typing `df.hvplot.scatter(...` as the `hvplot` accessor is dynamically patched on the data object on import (`import hvplot.pandas`). One valid workaround is to use instead the `hvPlot` class (`hvPlot(df).scatter(...`)), to see the signature (which only has the kind options, but that's better than nothing) and the method docstring. The method docstring only includes its specific options (e.g. `s` for `scatter`) and not all the other dozens of generic options available.

It seems like we could define a subset of common enough generic options that should always be part of the method docstrings. Or alternatively, or additionally, we could have a way to declare for each method a set of generic options that should be included in its docstring.

- [ ] Define a common subset of generic options that should be in all the plot method docstrings
- [ ] Declare for each method which additional generic options should be part of their docstring
- [ ] Implement a utility (that runs with pre-commit) that synchronizes the option docstrings from their source (the converter class) to their target (the plot methods in core.py).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.