Small plotting utility helpers from _plotting/_utils.py.
This module contains convenience functions for previewing color palettes.
show_tol_colorsshow_colors
Use show_tol_colors(...) to preview Paul Tol's 10-color palette, or a supplied list of colors, as a labeled bar strip.
def show_tol_colors(colors=None):import adata_science_tools as adtl
adtl.show_tol_colors()tol_palette — Paul Tol plotting palette. Data and analysis provenance.
Important behavior:
- If
colorsis omitted, the function uses the built-in Tol palette. - Each bar is labeled with its hex code.
- The function calls
plt.show(). - The current implementation does not return the figure.
Use show_colors(...) to preview an arbitrary color list and optionally save the figure.
def show_colors(colors=None,
title_text=' Color Palette',
save_plot=False,
save_file_dir=None,
save_file_name='color_palette.png'):adtl.show_colors(
colors=adtl.palettes.vega_10_scanpy,
title_text="Scanpy Vega 10",
save_plot=True,
save_file_name="vega_10_scanpy.png",
)categorical_palette — Categorical plotting palette. Data and analysis provenance.
Important behavior:
colorsshould be a list-like set of color strings.- The plot is shown with
plt.show()before any optional save. - When
save_plot=True, the function writes tosave_file_nameorsave_file_dir / save_file_name. save_file_diris used with the/operator, so passing apathlib.Pathis the safest option.- The function does not explicitly return the figure.
Direct show_colors(...) regression coverage is in tests/test_general_plot_renderers.py.

