MATPLOTLIBPlot#

class pyopenms_viz._matplotlib.MATPLOTLIBPlot(data, x: str | None = None, y: str | None = None, z: str | None = None, kind=None, by: str | None = None, plot_3d: bool = False, relative_intensity: bool = False, subplots: bool | None = None, sharex: bool | None = None, sharey: bool | None = None, height: int | None = None, width: int | None = None, grid: bool | None = None, toolbar_location: str | None = None, fig: 'figure' | None = None, title: str | None = None, xlabel: str | None = None, ylabel: str | None = None, zlabel: str | None = None, x_axis_location: str | None = None, y_axis_location: str | None = None, title_font_size: int | None = None, xaxis_label_font_size: int | None = None, yaxis_label_font_size: int | None = None, xaxis_tick_font_size: int | None = None, yaxis_tick_font_size: int | None = None, annotation_font_size: int | None = None, line_type: str | None = None, line_width: float | None = None, min_border: int | None = None, show_plot: bool | None = None, aggregate_duplicates: bool | None = None, legend: LegendConfig | Dict | None = None, feature_config: FeatureConfig | Dict | None = None, _config: _BasePlotConfig | None = None, **kwargs)#

Bases: BasePlot, ABC

Base class for assembling a Matplotlib plot.

data#

The input data frame.

Type:

DataFrame

_add_legend(ax, legend)#

Add a legend to the plot.

Parameters:
  • ax – The axes object.

  • legend – The legend configuration.

_create_figure()#

Create a figure and axes objects, for consistency with other backends, the self.fig object stores the matplotlib axes object

property _interactive#

Whether the plot is interactive. Must be overridden by subclasses

_load_extension()#

Load the matplotlib extension.

_modify_x_range(x_range: Tuple[float, float], padding: Tuple[float, float] | None = None)#

Modify the x-axis range.

Parameters:
  • x_range (Tuple[float, float]) – The x-axis range.

  • padding (Tuple[float, float] | None, optional) – The padding for the range. Defaults to None.

_modify_y_range(y_range: Tuple[float, float], padding: Tuple[float, float] | None = None)#

Modify the y-axis range.

Parameters:
  • y_range (Tuple[float, float]) – The y-axis range.

  • padding (Tuple[float, float] | None, optional) – The padding for the range. Defaults to None.

_update_plot_aes(ax, **kwargs)#

Update the plot aesthetics.

Parameters:
  • ax – The axes object.

  • **kwargs – Additional keyword arguments.

show_default()#

Show the plot.