ogstools.plot.vectorplots module#

ogstools.plot.vectorplots.streamlines(mesh, ax, variable, projection=None, arrowsize=None, density=1.5, streamlinewidth=2.5)[source]#

Plot the vector streamlines on a matplotlib axis.

Parameters:
  • mesh (DataSet) – Mesh containing the vector variable

  • ax (Axes) – Matplotlib axis to plot onto

  • variable (Vector) – Vector variable to visualize

  • projection (int | None) – Index of flat dimension (e.g. 2 for z axis), gets automatically determined if not given

  • arrowsize (float | None) – Sets size of arrows in the plot.

  • density (float) – density of streamlines

  • streamlinewidth (float) – base width of the streamlines

Return type:

None

ogstools.plot.vectorplots.quiver(mesh, ax, variable, projection=None, glyph_type='arrow', arrowsize=None, scale=0.03)[source]#

Plot arrows or lines corresponding to vectors on a matplotlib axis.

Parameters:
  • mesh (DataSet) – Mesh containing the vector variable

  • ax (Axes) – Matplotlib axis to plot onto

  • variable (Vector) – Vector variable to visualize

  • projection (int | None) – Index of flat dimension (e.g. 2 for z axis), gets automatically determined if not given

  • glyph_type (Literal['arrow', 'line']) – Whether to plot arrows or lines.

  • arrowsize (float | None) – Sets size of arrows in the plot.

  • scale (float) – scaling factor for lines / arrows

Return type:

None