pylbo.visualisation.modes.cylindrical_2d

Classes

CylindricalSlicePlot2D

Class for handling cylindrical 2D plots of the eigenmode solutions.

Module Contents

class pylbo.visualisation.modes.cylindrical_2d.CylindricalSlicePlot2D(data: pylbo.visualisation.modes.mode_data.ModeVisualisationData, u2: float | numpy.ndarray, u3: float | numpy.ndarray, time: float, slicing_axis: str, figsize: tuple[int, int], show_ef_panel: bool, polar: bool, **kwargs)

Bases: pylbo.visualisation.modes.cartesian_2d.CartesianSlicePlot2D

Class for handling cylindrical 2D plots of the eigenmode solutions.

Parameters:
  • data (ModeVisualisationData) – The data for the visualisation.

  • u2 (float or ndarray) – The \(\theta\) coordinate of the eigenmode solution.

  • u3 (float or ndarray) – The \(z\) coordinate of the eigenmode solution.

  • time (float) – The time at which the eigenmode solution is calculated.

  • slicing_axis (str) – The axis along which the eigenmode solution is sliced.

  • figsize (tuple[int, int]) – The size of the figure.

  • show_ef_panel (bool) – Whether to show the eigenfunction panel.

  • polar (bool) – Whether to use polar coordinates for the plot.

  • **kwargs – Additional keyword arguments to be passed to matplotlib.pyplot.pcolormesh().

_use_polar_axes
set_plot_arrays() None

Sets the arrays used for plotting. This should implement setting of u1_data, u2_data, u3_data, t_data and ef_data.

_draw_image() None
_draw_contours() None
draw_eigenfunction() None

Draws the eigenfunction(s) to the figure.

get_view_xlabel() str
get_view_ylabel() str
_create_figure_layout(figsize: tuple[int, int]) tuple[matplotlib.figure.Figure, dict]

Create the figure layout for the visualisation. Two panels are created: the top one for the eigenfunction and the bottom one for the visualisation.

Parameters:

figsize (tuple[int, int]) – The size of the figure.

Returns:

  • fig (~matplotlib.figure.Figure) – The figure to use for the visualisation.

  • axes (dict) – The axes to use for the visualisation.