BOKEHPlot#
- class pyopenms_viz._bokeh.BOKEHPlot(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 Bokeh plot
- _add_bounding_box_drawer(fig, **kwargs)#
Add a BoxEditTool to the figure for drawing bounding boxes.
- Parameters:
fig (figure) – The Bokeh figure object to add the BoxEditTool to.
- Returns:
The renderer object that is used to draw the bounding box.
- _add_bounding_vertical_drawer(fig, **kwargs)#
Add a BoxEditTool to the figure for drawing bounding vertical strips.
- Parameters:
fig (figure) – The Bokeh figure object to add the BoxEditTool to.
- Returns:
The renderer object that is used to draw the bounding box.
- _add_legend(fig, legend)#
Add the legend
- _add_tooltips(fig, tooltips, custom_hover_data=None, fixed_tooltip_for_trace=True)#
Add tooltips to the plot
- _interactive()#
Whether the plot is interactive. Must be overridden by subclasses
- _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 desired x-axis range.
padding (Tuple[float, float] | None, optional) – The padding to be applied to the x-axis range, in decimal percent. Defaults to None.
- _modify_y_range(y_range: Tuple[float, float], padding: Tuple[float, float] | None = None)#
Modifies the y-axis range of the plot.
- Parameters:
y_range (Tuple[float, float]) – The desired y-axis range.
padding (Tuple[float, float] | None, optional) – The padding to be applied to the y-axis range, in decimal percent. Defaults to None.
- _update_plot_aes(fig, **kwargs)#
Update the aesthetics of the plot