hvplot
hvplot copied to clipboard
vectorfield: 'x', 'y', 'mag' and 'angle' as default values
The current docstring of vectorfield claims x, y, mag, angle are optional. I don't find that.
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()
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.