holoviz / holoviz/hvplot

Re-add an Examples section to the plotting method docstrings

Open
#1,627 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

In https://github.com/holoviz/hvplot/pull/1625 I removed the `Examples` section of each plotting method docstring as we now have a more extended Examples section added to each reference page, building it from a notebook. However, this means that users typing `hvPlot(df).line()` in an IDE will no longer see the Examples section. We should find a way to fix that. Some approaches:

- Add the Examples section to each docstring when building hvPlot (I think seaborn does that?)
- Have a pre-commit hook that reads a plotting method notebook and copies its Example section to the plotting method docstring in `core.py`

Note that I have made sure that each Examples section starts with a simple example that can be run without having to install `hvsampledata` so users are more likely to be able to run them. Usually, they manually build a Pandas DataFrame or an Xarray Dataset. We could also decide to only include that first example not to make the docstring too long. I think it'd rather have the full Examples section.

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.