holoviz / hvplot

A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews
https://hvplot.holoviz.org
BSD 3-Clause "New" or "Revised" License
1.13k stars 109 forks source link

Preset combination plots #530

Open ahuang11 opened 3 years ago

ahuang11 commented 3 years ago

I think it'd be nice to have commonly used plots like:

ds.hvplot.preset.line_area() (like the line area in https://hvplot.holoviz.org/user_guide/Plotting.html) line (show individual data points with alpha set to like 0.05) line (mean of lines) * area (min + max points)

ds.hvplot.preset.line_label() line * label (label y for the last value of x)

ds.hvplot.preset.bar_line() (like http://arctic.som.ou.edu/tburg/products/covid19/files_states/rolling_total_summary.png) bar (show individual data points) * line (rolling mean)

ds.hvplot.preset.scatter_violin() (like https://davidbaranger.com/2018/03/05/showing-your-data-scatter-box-violin-plots/) scatter (show individual data points) * violin (aggregate of data points)

ds.hvplot.preset.scatter_hex() scatter (show individual data points) * hex (aggregate of data points)

And more

jbednar commented 3 years ago

Sounds useful and easy enough to do, but the real work is then on documenting the options for such plots, putting examples on the website, etc. And there are an infinite number of them...

ahuang11 commented 2 years ago

Haha should I give this a try? I think even though there's an infinite number of them, we can start with the most commonly seen ones (which I think is listed above and probably is opinionated).

I imagine it would be a separate docs section like: https://hvplot.holoviz.org/user_guide/Statistical_Plots.html

But would be like https://hvplot.holoviz.org/user_guide/Combination_Plots.html or preset_plots

maximlt commented 2 years ago

I think that I'd prefer actually documenting these sorts of use case better. Moving towards Diataxis would help with that, we could populate the How-to section with such examples.