pyfli.plot_style#

plot_style.py#

Shared line/marker color palette and outside-axes legend placement for the plotting functions in pyfli.analysis and pyfli.data_vnp.

Every categorical palette in those two packages is built from dark_palette() (or is DARK_PALETTE itself), so retheming every plot that uses one means editing VMAX/SMIN (or a call’s base= seaborn palette name) here rather than touching each plotting function.

Functions

dark_palette(n_colors[, base, vmax, smin])

Return n_colors dark, mutually distinguishable colors derived from a seaborn base palette (any name/list accepted by seaborn.color_palette).

darken_color(color[, vmax, smin])

Cap an RGB(A) color's brightness and floor its saturation so it reads as dark.

legend_outside(ax[, loc, bbox_to_anchor, ...])

Draw ax's legend outside the axes box (to the right, by default) instead of overlapping the plotted data.

darken_color(color, vmax=VMAX, smin=SMIN)[source]#

Cap an RGB(A) color’s brightness and floor its saturation so it reads as dark.

Parameters:
Return type:

tuple[float, …]

dark_palette(n_colors, base='colorblind', vmax=VMAX, smin=SMIN)[source]#

Return n_colors dark, mutually distinguishable colors derived from a seaborn base palette (any name/list accepted by seaborn.color_palette).

Parameters:
Return type:

list[tuple[float, …]]

legend_outside(ax, loc='upper left', bbox_to_anchor=(1.02, 1.0), borderaxespad=0.0, **kwargs)[source]#

Draw ax’s legend outside the axes box (to the right, by default) instead of overlapping the plotted data.

Parameters:
Return type:

Any