hvPlot.vectorfield#
- hvPlot.vectorfield(x=None, y=None, angle=None, mag=None, **kwds)[source]#
vectorfield visualizes vectors given by the (x `, `y) starting point, a magnitude (mag) and an angle. A vectorfield plot is also known as a quiver plot.
Reference: https://hvplot.holoviz.org/reference/xarray/vectorfield.html
- Parameters:
- xstring
Field name to draw x-positions from
- ystring
Field name to draw y-positions from
- magstring
Magnitude
- anglestring
Angle in radians.
- **kwdsoptional
Additional keywords arguments are documented in hvplot.help(‘vectorfield’). See Plotting Options for more information.
- Returns:
holoviews.element.Points
/ Panel objectYou can print the object to study its composition and run:
import holoviews as hv hv.help(the_holoviews_object)
to learn more about its parameters and options.
References
Bokeh: https://docs.bokeh.org/en/latest/docs/gallery/quiver.html
HoloViews: https://holoviews.org/reference/elements/bokeh/VectorField.html
Matplotlib: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.quiver.html
Examples
import hvplot.pandas import numpy as np import pandas as pd 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(x="x", y="y", angle="angle", mag="mag")
Backend-specific styling options#
alpha, cmap, color, hover_alpha, hover_color, hover_line_alpha, hover_line_cap, hover_line_color, hover_line_dash, hover_line_dash_offset, hover_line_join, hover_line_width, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, muted, muted_alpha, muted_color, muted_line_alpha, muted_line_cap, muted_line_color, muted_line_dash, muted_line_dash_offset, muted_line_join, muted_line_width, nonselection_alpha, nonselection_color, nonselection_line_alpha, nonselection_line_cap, nonselection_line_color, nonselection_line_dash, nonselection_line_dash_offset, nonselection_line_join, nonselection_line_width, scale, selection_alpha, selection_color, selection_line_alpha, selection_line_cap, selection_line_color, selection_line_dash, selection_line_dash_offset, selection_line_join, selection_line_width, visible
alpha, c, cmap, color, ec, edgecolor, edgecolors, facecolors, headaxislength, headlength, headwidth, linewidth, lw, marker, norm, pivot, scale, visible, width
Examples#
TBD