labcore.analysis.hv_pretty#

Functions

add_legend(plot[, location, show])

Configure legend visibility and position.

correctly_sized_figure([width, height])

Returns width and height in pixels from inches.

format_ax(plot[, title, xlabel, ylabel, ...])

Apply axis and label formatting options to a hvplot object.

save_plot_as_png(plot, filename[, width_in, ...])

Save a Holoviews plot to a high-resolution PNG with embedded DPI metadata.

set_arial_font(plot[, element])

Applies Arial font to all textual elements of a bokeh-based hvplot.

setup_plotting([style, context, font_scale])

Sets up seaborn styling globally for consistency with matplotlib-style aesthetics.

labcore.analysis.hv_pretty.add_legend(plot: Any, location: str = 'top_right', show: bool = True) Any[source]#

Configure legend visibility and position.

labcore.analysis.hv_pretty.correctly_sized_figure(width: float = 6, height: float = 4) dict[str, int][source]#

Returns width and height in pixels from inches.

labcore.analysis.hv_pretty.format_ax(plot: Any, title: str | None = None, xlabel: str | None = None, ylabel: str | None = None, fontsize: int = 12, title_fontsize: int = 14, xticks: Any = None, yticks: Any = None, xlim: Any = None, ylim: Any = None, axes_pad: float = 0.05, tick_fontsize: int = 10) Any[source]#

Apply axis and label formatting options to a hvplot object.

labcore.analysis.hv_pretty.save_plot_as_png(plot: Any, filename: Any, width_in: float = 6, height_in: float = 4, dpi: int = 300, embed_dpi: bool = True) None[source]#

Save a Holoviews plot to a high-resolution PNG with embedded DPI metadata.

Parameters: - plot : Holoviews object (e.g. from hvplot) - filename : Target output PNG file (e.g. ‘figure.png’) - width_in : Width in inches (default: 6) - height_in : Height in inches (default: 4) - dpi : Dots per inch (default: 300) - embed_dpi : Whether to embed DPI metadata using PIL (default: True)

labcore.analysis.hv_pretty.set_arial_font(plot: Any, element: Any = None) None[source]#

Applies Arial font to all textual elements of a bokeh-based hvplot.

labcore.analysis.hv_pretty.setup_plotting(style: str = 'whitegrid', context: str = 'notebook', font_scale: float = 1.2) None[source]#

Sets up seaborn styling globally for consistency with matplotlib-style aesthetics.