hvplot and holoviews unconsistencies
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
#### ALL software version info
python : 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21) [GCC 10.3.0]
pandas : 1.5.1
holoviews : 1.15.1
hvplot : 0.8.1
bokeh : 2.4.3
matplotlib : 3.6.1
#### Description of expected behavior and the observed behavior
When I am composing plots build with hvplot (https://hvplot.holoviz.org/user_guide/Plotting.html#composing-plots), it behaves not consistently with some options. Legend has no legend title in composite plot, option like 'legend' doesn't produce any effect with 'matplotlib' extension. And more confusingly, I have to use the holoviews `legend_position` in composite plots options, not hvplot `legend` option. I haven't check more options but here are some API discrepancies between hvplot and holoviews modules and bokeh and matplotlib extensions.
I expect that extensions behaves in the same way when composing plots from hvplot. And I think make difference in options name between hvplot and holoviews is very confusing.
In the same way, the `alpha=` (and not `line_alpha=`) keywords seems strange with `compatibility='bokeh'`.
#### Complete, minimal, self-contained example code that reproduces the issue
```python
import numpy as np
import pandas as pd
import hvplot
import hvplot.pandas
hvplot.extension('bokeh')
index = pd.date_range('1/1/2000', periods=1000)
df = pd.DataFrame(np.random.randn(1000, 4), index=index, columns=list('ABCD')).cumsum()
p1 = df.hvplot(width=400, line_width=4, line_dash='dashed', legend='top')
p2 = df.hvplot(width=400, alpha=0.5, legend='top')
p1 + p2 + p1*p2
```
produces

while
```python
hvplot.extension('matplotlib', compatibility='bokeh')
index = pd.date_range('1/1/2000', periods=1000)
df = pd.DataFrame(np.random.randn(1000, 4), index=index, columns=list('ABCD')).cumsum()
p1 = df.hvplot(width=400, line_width=4, line_dash='dashed', legend='top')
p2 = df.hvplot(width=400, alpha=0.5, legend='top')
p1 + p2 + p1*p2
```

for which you need to specify `legend_position` (and not `legend` as `hvplot` options) to get a similar behavior between `matplotlib` and `bokeh` extension.
```python
p1 + p2 + (p1*p2).opts(legend_position='top')
```

Contributor guide
Assessment
This issue has not been assessed yet.