vectorfield: 'x', 'y', 'mag' and 'angle' as default values
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
The current docstring of `vectorfield` claims `x`, `y`, `mag`, `angle` are optional. I don't find that.
```python
import hvplot.pandas
import pandas as pd
import numpy as np
data = pd.DataFrame(
dict(
x=[49.9, 50.0, 50.1, 50.2],
y=[50.2, 49.9, 50.0, 50.2],
angle=[2 * np.pi, np.pi, np.pi, np.pi],
mag=[0.01, 0.02, -0.02, -0.01],
)
)
data.hvplot.vectorfield()
```
```bash
AttributeError: 'DataFrame' object has no attribute 'coords'
```
For now I change the docstring to specify that parameters are mandatory. BUT it think it would be a very useful and logical extension of `points` that the defaults are set to 'x', 'y', 'mag', 'angle', i.e. that the above example would work.
Contributor guide
Assessment
This issue has not been assessed yet.