ogstools.plot.lineplots module#
- ogstools.plot.lineplots.linesample(mesh, x, variable, profile_points, ax, resolution=100, grid=None, **kwargs)[source]#
Plot selected variables obtained from sample_over_polyline function, this function calls to it internally. Values provided in param x and y refer to columns of the DataFrame returned by it.
- Parameters:
mesh (UnstructuredGrid) – mesh to sample from.
x (str) – Value to be used on x-axis of the plot
variable (str | Variable) – Values to be used on y-axis of the plot
profile_points (ndarray) – Points defining the profile (and its segments)
ax (Axes) – User-created array of Matplotlib axis object
resolution (int | None) – Resolution of the sampled profile. Total number of points within all profile segments.
resolution – Resolution of the sampled profile. Total number of points within all profile segments.
grid (Literal['major', 'both', None] | None) – Which gridlines should be drawn?
kwargs (Any) – Optional keyword arguments passed to matplotlib.pyplot.plot to customize plot options like a line label (for auto legends), linewidth, antialiasing, marker face color.
- Returns:
Matplotlib Axes object
- Return type:
Axes
- ogstools.plot.lineplots.linesample_contourf(mesh, variables, profile_points, resolution=None, plot_nodal_pts=True, nodal_pts_labels=None)[source]#
Default plot for the data obtained from sampling along a profile on a mesh.
- Parameters:
mesh (UnstructuredGrid) – mesh to plot and sample from.
variables (str | list | Variable) – Variables to be read from the mesh
profile_points (ndarray) – Points defining the profile (and its segments)
resolution (int | None) – Resolution of the sampled profile. Total number of points within all profile segments.
plot_nodal_pts (bool | None) – Plot and annotate all nodal points in profile
nodal_pts_labels (str | list | None) – Labels for nodal points (only use if plot_nodal_points is set to True)
- Returns:
Tuple containing Matplotlib Figure and Axis objects
- Return type:
tuple[Figure, Axes]