BasePlotConfig#

class pyopenms_viz._config.BasePlotConfig(*, kind: ~typing.Literal['line', 'vline', 'scatter', 'chromatogram', 'mobilogram', 'spectrum', 'peakmap', 'complex'] | None = None, x: str | None = None, y: str | None = None, z: str | None = None, by: str | None = None, canvas: ~typing.Any = None, height: int = 500, width: int = 500, grid: bool = True, toolbar_location: str = 'above', title: str = '', xlabel: str = '', ylabel: str = '', zlabel: str = '', title_font_size: int = 18, xaxis_label_font_size: int = 16, yaxis_label_font_size: int = 16, zaxis_label_font_size: int = 16, xaxis_labelpad: int = 16, yaxis_labelpad: int = 16, zaxis_labelpad: int = 9, xaxis_tick_font_size: int = 14, yaxis_tick_font_size: int = 14, zaxis_tick_font_size: int = 14, y_axis_location: ~typing.Literal['left', 'right'] = 'left', x_axis_location: ~typing.Literal['above', 'below'] = 'below', annotation_font_size: int = 12, color: str | ~typing.Iterator[str] = <factory>, plot_3d: bool = False, min_border: int = 0, show_plot: bool = True, relative_intensity: bool = False, aggregate_duplicates: bool = False, legend_config: ~pyopenms_viz._config.LegendConfig | dict = <factory>, opacity: float = 1.0)#

Bases: BaseConfig

Base configuration for a plot.

kind#

Type of plot. Required.

Type:

Literal[“chromatogram”, “mobilogram”, “spectrum”, “peakmap”]

x#

The column name for the x-axis data. Required.

Type:

str

y#

The column name for the y-axis data. Required.

Type:

str

z#

The column name for the z-axis data. Required.

Type:

str

canvas#

Canvas for the plot. For Bokeh, this is a bokeh.plotting.Figure object. For Matplotlib, this is an Axes object, and for Plotly, this is a plotly.graph_objects.Figure object. If none, axis will be created Defaults to None.

Type:

Any

height#

Height of the plot. Defaults to 500.

Type:

int, optional

width#

Width of the plot. Defaults to 500.

Type:

int, optional

grid#

Whether to show grid. Defaults to True.

Type:

bool, optional

toolbar_location#

Location of the toolbar. Defaults to “above”.

Type:

str, optional

title#

Title of the plot. Defaults to an empty string.

Type:

str, optional

xlabel#

Label for the X-axis. Defaults to an empty string.

Type:

str, optional

ylabel#

Label for the Y-axis. Defaults to an empty string.

Type:

str, optional

zlabel#

Label for the Z-axis, only applicable if 3D plot. Defaults to an empty string.

Type:

str, optional

title_font_size#

Font size of the title. Defaults to 18.

Type:

int, optional

xaxis_label_font_size#

Font size of the X-axis label. Defaults to 16.

Type:

int, optional

yaxis_label_font_size#

Font size of the Y-axis label. Defaults to 16.

Type:

int, optional

zaxis_label_font_size#

Font size of the Z-axis label. Defaults to 16.

Type:

int, optional

xaxis_labelpad#

Padding for the X-axis label. Defaults to 16.

Type:

int, optional

yaxis_labelpad#

Padding for the Y-axis label. Defaults to 16.

Type:

int, optional

zaxis_labelpad#

Padding for the Z-axis label, only applicable if 3D plot. Defaults to 9.

Type:

int, optional

xaxis_tick_font_size#

Font size for X-axis tick labels. Defaults to 14.

Type:

int, optional

yaxis_tick_font_size#

Font size for Y-axis tick labels. Defaults to 14.

Type:

int, optional

zaxis_tick_font_size#

Font size for Z-axis tick labels. Defaults to 14.

Type:

int, optional

y_axis_location#

Location of the Y-axis. Defaults to “left”.

Type:

Literal[“left”, “right”], optional

x_axis_location#

Location of the X-axis. Defaults to “below”.

Type:

Literal[“above”, “below”], optional

annotation_font_size#

Font size for annotations. Defaults to 12.

Type:

int, optional

color#

Color or color iterator for plot elements. Defaults to ColorGenerator.

Type:

str | Iterator[str], optional

plot_3d#

Whether to plot in 3D. Defaults to False.

Type:

bool, optional

min_border#

Minimum border size in pixels. Defaults to 0.

Type:

int, optional

show_plot#

Whether to display the plot. Defaults to True.

Type:

bool, optional

relative_intensity#

Whether to normalize intensity values. Defaults to False.

Type:

bool, optional

aggregate_duplicates#

Whether to aggregate duplicate data points. Defaults to False.

Type:

bool, optional

legend_config#

Configuration for the legend, see legend configuration options for more details.

Type:

LegendConfig | dict, optional

opacity#

Opacity of plot. Defaults to 1.0.

Type:

float, optional

default_legend_factory()#

Returns a default LegendConfig instance with the title “Trace”.

__eq__(other)#

Return self==value.

__init__(*, kind: ~typing.Literal['line', 'vline', 'scatter', 'chromatogram', 'mobilogram', 'spectrum', 'peakmap', 'complex'] | None = None, x: str | None = None, y: str | None = None, z: str | None = None, by: str | None = None, canvas: ~typing.Any = None, height: int = 500, width: int = 500, grid: bool = True, toolbar_location: str = 'above', title: str = '', xlabel: str = '', ylabel: str = '', zlabel: str = '', title_font_size: int = 18, xaxis_label_font_size: int = 16, yaxis_label_font_size: int = 16, zaxis_label_font_size: int = 16, xaxis_labelpad: int = 16, yaxis_labelpad: int = 16, zaxis_labelpad: int = 9, xaxis_tick_font_size: int = 14, yaxis_tick_font_size: int = 14, zaxis_tick_font_size: int = 14, y_axis_location: ~typing.Literal['left', 'right'] = 'left', x_axis_location: ~typing.Literal['above', 'below'] = 'below', annotation_font_size: int = 12, color: str | ~typing.Iterator[str] = <factory>, plot_3d: bool = False, min_border: int = 0, show_plot: bool = True, relative_intensity: bool = False, aggregate_duplicates: bool = False, legend_config: ~pyopenms_viz._config.LegendConfig | dict = <factory>, opacity: float = 1.0) None#
__repr__()#

Return repr(self).