Parameters#
Pyopenms-viz plotting occurs by calling the .plot() method on a pandas dataframe. Mandatory values are the column names for the x, y (and possibly z) axis as well as the kind of plot. Additional options are listed below.
General Options include (mandatory fields are starred)
Parameter |
Type |
Description |
Default |
|---|---|---|---|
kind* |
Literal[“chromatogram”, “mobilogram”, “spectrum”, “peakmap”] |
Type of plot. Required. |
|
x* |
str |
The column name for the x-axis data. Required. |
|
y* |
str |
The column name for the y-axis data. Required. |
|
z* |
str |
The column name for the z-axis data. Required. |
|
canvas* |
Any |
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. |
|
height |
int |
Height of the plot. Defaults to 500. |
500 |
width |
int |
Width of the plot. Defaults to 500. |
500 |
grid |
bool |
Whether to show grid. Defaults to True. |
True |
toolbar_location |
str |
Location of the toolbar. Defaults to “above”. |
“above” |
title |
str |
Title of the plot. Defaults to an empty string. |
an empty string |
xlabel |
str |
Label for the X-axis. Defaults to an empty string. |
an empty string |
ylabel |
str |
Label for the Y-axis. Defaults to an empty string. |
an empty string |
zlabel |
str |
Label for the Z-axis, only applicable if 3D plot. Defaults to an empty string. |
an empty string |
title_font_size |
int |
Font size of the title. Defaults to 18. |
18 |
xaxis_label_font_size |
int |
Font size of the X-axis label. Defaults to 16. |
16 |
yaxis_label_font_size |
int |
Font size of the Y-axis label. Defaults to 16. |
16 |
zaxis_label_font_size |
int |
Font size of the Z-axis label. Defaults to 16. |
16 |
xaxis_labelpad |
int |
Padding for the X-axis label. Defaults to 16. |
16 |
yaxis_labelpad |
int |
Padding for the Y-axis label. Defaults to 16. |
16 |
zaxis_labelpad |
int |
Padding for the Z-axis label, only applicable if 3D plot. Defaults to 9. |
9 |
xaxis_tick_font_size |
int |
Font size for X-axis tick labels. Defaults to 14. |
14 |
yaxis_tick_font_size |
int |
Font size for Y-axis tick labels. Defaults to 14. |
14 |
zaxis_tick_font_size |
int |
Font size for Z-axis tick labels. Defaults to 14. |
14 |
y_axis_location |
Literal[“left”, “right”] |
Location of the Y-axis. Defaults to “left”. |
“left” |
x_axis_location |
Literal[“above”, “below”] |
Location of the X-axis. Defaults to “below”. |
“below” |
annotation_font_size |
int |
Font size for annotations. Defaults to 12. |
12 |
color |
str | Iterator[str] |
Color or color iterator for plot elements. Defaults to ColorGenerator. |
ColorGenerator |
plot_3d |
bool |
Whether to plot in 3D. Defaults to False. |
False |
min_border |
int |
Minimum border size in pixels. Defaults to 0. |
0 |
show_plot |
bool |
Whether to display the plot. Defaults to True. |
True |
relative_intensity |
bool |
Whether to normalize intensity values. Defaults to False. |
False |
aggregate_duplicates |
bool |
Whether to aggregate duplicate data points. Defaults to False. |
False |
legend_config* |
LegendConfig | dict |
Configuration for the legend, see legend configuration options for more details. |
|
opacity |
float |
Opacity of plot. Defaults to 1.0. |
1.0 |
Parameter |
Type |
Description |
Default |
|---|---|---|---|
loc |
str |
Location of the legend. Defaults to “right”. |
“right” |
orientation |
str |
Orientation of the legend. Defaults to “vertical”. |
“vertical” |
title |
str |
Title of the legend. Defaults to “Legend”. |
“Legend” |
fontsize |
int |
Font size of the legend text. Defaults to 10. |
10 |
show |
bool |
Whether to show the legend. Defaults to True. |
True |
onClick |
Literal[“hide”, “mute”] |
Action on legend click. Only valid for Bokeh. Defaults to “mute”. |
“mute” |
bbox_to_anchor |
Tuple[float, float] |
Fine control for legend positioning in Matplotlib. Defaults to (1.2, 0.5). |
(1.2, 0.5) |
Please click on a kind of plot below for more details on their specific parameters: