MATPLOTLIBVLinePlot#

class pyopenms_viz._matplotlib.MATPLOTLIBVLinePlot(data: DataFrame, config: BasePlotConfig = None, **kwargs)#

Bases: MATPLOTLIBPlot, VLinePlot

Class for assembling a matplotlib vertical line plot

plot()#

Plot a vertical line

Plot method for creating plots from a Pandas DataFrame.

datapandas.DataFrame or numpy.ndarray

The data to be plotted.

xstr or None, optional

The column name for the x-axis data.

ystr or None, optional

The column name for the y-axis data.

zstr or None, optional

The column name for the z-axis data (for 3D plots).

kindstr, optional

The kind of plot to create. One of: (‘line’, ‘vline’, ‘scatter’, ‘chromatogram’, ‘mobilogram’, ‘spectrum’, ‘peakmap’)

bystr or None, optional

Column in the DataFrame to group by.

relative_intensitybool, default False

Whether to use relative intensity for the y-axis.

subplotsbool or None, optional

Whether to create separate subplots for each column.

sharex, shareybool or None, optional

Whether to share x or y axes among subplots.

height, widthint or None, optional

The height and width of the figure in pixels.

gridbool or None, optional

Whether to show the grid on the plot.

toolbar_locationstr or None, optional

The location of the toolbar (e.g., ‘above’, ‘below’, ‘left’, ‘right’).

figfigure or None, optional

An existing figure object to plot on.

titlestr or None, optional

The title of the plot.

xlabel, ylabelstr or None, optional

Labels for the x and y axes.

x_axis_location, y_axis_locationstr or None, optional

The location of the x and y axes (e.g., ‘bottom’, ‘top’, ‘left’, ‘right’).

line_typestr or None, optional

The type of line to use (e.g., ‘solid’, ‘dashed’, ‘dotted’).

line_widthfloat or None, optional

The width of the lines in the plot.

min_borderint or None, optional

The minimum border size around the plot.

show_plotbool or None, optional

Whether to display the plot immediately after creation.

legendLegendConfig or dict or None, optional

Configuration for the plot legend.

feature_configFeatureConfig or dict or None, optional

Configuration for additional plot features.

backendstr, default None

Backend to use instead of the backend specified in the option plotting.backend. For pyopenms_viz, options are one of (‘ms_matplotlib’, ‘ms_bokeh’, ‘ms_plotly’) Alternatively, to specify the plotting.backend for the whole session, set pd.options.plotting.backend.

**kwargs

Additional keyword arguments to be passed to the plotting function.

None

>>> import pandas as pd
>>>
>>> data = pd.DataFrame(dict'x': [1, 2, 3], 'y': [4, 5, 6]))
>>> data.plot(x='x', y='y', kind='spectrum', backend='pomsvim')