PeakMapConfig#

class pyopenms_viz._config.PeakMapConfig(*, 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 = 'PeakMap', xlabel: str = 'Retention Time', ylabel: str = 'mass-to-charge', zlabel: str = 'Intensity', 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, bin_peaks: ~typing.Literal['auto'] | bool = 'auto', num_x_bins: int = 50, num_y_bins: int = 50, z_log_scale: bool = False, fill_by_z: bool = True, marker_size: int = 30, marker: ~typing.Iterator[str] | ~pyopenms_viz._misc.MarkerShapeGenerator = <factory>, add_marginals: bool = False, y_kind: str = 'spectrum', x_kind: str = 'chromatogram', aggregation_method: ~typing.Literal['mean', 'sum', 'max'] = 'mean', annotation_data: ~pandas.core.frame.DataFrame | None = None, annotation_x_lb: str = 'leftWidth', annotation_x_ub: str = 'rightWidth', annotation_y_lb: str = 'IM_leftWidth', annotation_y_ub: str = 'IM_rightWidth', annotation_colors: str = 'color', annotation_names: str = 'name', annotation_colormap: str = 'Dark2', annotation_line_width: float = 3, annotation_line_type: str = 'solid', annotation_legend_config: ~typing.Dict | ~pyopenms_viz._config.LegendConfig = <factory>, x_plot_config: ~pyopenms_viz._config.ChromatogramConfig | ~pyopenms_viz._config.SpectrumConfig = None, y_plot_config: ~pyopenms_viz._config.ChromatogramConfig | ~pyopenms_viz._config.SpectrumConfig = None)#

Bases: ScatterConfig

Configuration for a peak map plot.

add_marginals#

Whether to add marginal plots. Defaults to False.

Type:

bool

y_kind#

Type of plot for the Y-axis marginal. Defaults to “spectrum”.

Type:

str

x_kind#

Type of plot for the X-axis marginal. Defaults to “chromatogram”.

Type:

str

aggregation_method#

Method for aggregating data. Defaults to “mean”.

Type:

Literal[“mean”, “sum”, “max”]

annotation_data#

Data for annotations. Defaults to None.

Type:

pd.DataFrame | None

annotation_colormap#

Colormap for annotations. Defaults to “Dark2”.

Type:

str

annotation_line_width#

Width of the annotation lines. Defaults to 3.

Type:

float

annotation_line_type#

Type of the annotation lines (e.g., “solid”, “dashed”). Defaults to “solid”.

Type:

str

annotation_legend_config#

Configuration for the annotation legend. Defaults to a LegendConfig instance with title “Features”.

Type:

Dict | LegendConfig

xlabel#

Label for the X-axis. Defaults to “Retention Time”.

Type:

str

ylabel#

Label for the Y-axis. Defaults to “mass-to-charge”.

Type:

str

zlabel#

Label for the Z-axis. Defaults to “Intensity”.

Type:

str

title#

Title of the plot. Defaults to “PeakMap”.

Type:

str

x_plot_config#

Configuration for the X-axis marginal plot. Defaults to (set internally).

Type:

ChromatogramConfig | SpectrumConfig

y_plot_config#

Configuration for the Y-axis marginal plot. Defaults to (set internally).

Type:

ChromatogramConfig | SpectrumConfig

Note

y_kind / x_kind is only relevant if add_marginals is set to True.

__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 = 'PeakMap', xlabel: str = 'Retention Time', ylabel: str = 'mass-to-charge', zlabel: str = 'Intensity', 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, bin_peaks: ~typing.Literal['auto'] | bool = 'auto', num_x_bins: int = 50, num_y_bins: int = 50, z_log_scale: bool = False, fill_by_z: bool = True, marker_size: int = 30, marker: ~typing.Iterator[str] | ~pyopenms_viz._misc.MarkerShapeGenerator = <factory>, add_marginals: bool = False, y_kind: str = 'spectrum', x_kind: str = 'chromatogram', aggregation_method: ~typing.Literal['mean', 'sum', 'max'] = 'mean', annotation_data: ~pandas.core.frame.DataFrame | None = None, annotation_x_lb: str = 'leftWidth', annotation_x_ub: str = 'rightWidth', annotation_y_lb: str = 'IM_leftWidth', annotation_y_ub: str = 'IM_rightWidth', annotation_colors: str = 'color', annotation_names: str = 'name', annotation_colormap: str = 'Dark2', annotation_line_width: float = 3, annotation_line_type: str = 'solid', annotation_legend_config: ~typing.Dict | ~pyopenms_viz._config.LegendConfig = <factory>, x_plot_config: ~pyopenms_viz._config.ChromatogramConfig | ~pyopenms_viz._config.SpectrumConfig = None, y_plot_config: ~pyopenms_viz._config.ChromatogramConfig | ~pyopenms_viz._config.SpectrumConfig = None) None#
__repr__()#

Return repr(self).