pyvista.DataSetFilters.plot_over_line#
- DataSetFilters.plot_over_line(
- pointa: VectorLike[float],
- pointb: VectorLike[float],
- resolution: int | None = None,
- scalars: str | None = None,
- title: str | None = None,
- ylabel: str | None = None,
- figsize: tuple[int, int] | None = None,
- figure: bool = True,
- show: bool = True,
- tolerance: float | None = None,
- fname: str | None = None,
- progress_bar: bool = False,
Sample a dataset along a high resolution line and plot.
Plot the variables of interest in 2D using matplotlib where the X-axis is distance from Point A and the Y-axis is the variable of interest. Note that this filter returns
None
.- Parameters:
- pointasequence[
float
] Location in
[x, y, z]
.- pointbsequence[
float
] Location in
[x, y, z]
.- resolution
int
,optional
Number of pieces to divide line into. Defaults to number of cells in the input mesh. Must be a positive integer.
- scalars
str
,optional
The string name of the variable in the input dataset to probe. The active scalar is used by default.
- title
str
,optional
The string title of the matplotlib figure.
- ylabel
str
,optional
The string label of the Y-axis. Defaults to variable name.
- figsize
tuple
(int
,int
),optional
The size of the new figure.
- figurebool, default:
True
Flag on whether or not to create a new figure.
- showbool, default:
True
Shows the matplotlib figure.
- tolerance
float
,optional
Tolerance used to compute whether a point in the source is in a cell of the input. If not given, tolerance is automatically generated.
- fname
str
,optional
Save the figure this file name when set.
- progress_barbool, default:
False
Display a progress bar to indicate progress.
- pointasequence[
Examples
See the Plot Over Line example.