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, location='top_right', show=True)[source]#

Configure legend visibility and position.

labcore.analysis.hv_pretty.correctly_sized_figure(width=6, height=4)[source]#

Returns width and height in pixels from inches.

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

Apply axis and label formatting options to a hvplot object.

labcore.analysis.hv_pretty.save_plot_as_png(plot, filename, width_in=6, height_in=4, dpi=300, embed_dpi=True)[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, element=None)[source]#

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

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

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