Styles & palettes#

Every plot_* shares one global style, set with set_publication_style(). It applies the bold, figures4papers look automatically on import — switch style or palette with a single call.

Style presets#

sv.set_publication_style()           # "bold" (figures4papers) — the default
sv.set_publication_style("nature")   # compact, journal-clean

The same bar chart in each preset:

bold (figures4papers) — default
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/preset_bold.png

Thick 2 pt axes, bold titles, black-edged bars — high impact for talks, posters, and punchy paper panels.

nature
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/preset_nature.png

Thin 0.8 pt line art, compact type, un-bolded — matches Nature’s artwork guidance for journal submission.

Journal palettes#

Match a target venue’s colour scheme with one argument. The hex schemes mirror the ggsci palettes that are the de-facto standard in bioinformatics papers:

palette

venue

npg

Nature Publishing Group

aaas

Science / AAAS

nejm

New England Journal of Medicine

lancet

The Lancet

jama

JAMA

okabe-ito

colour-blind-safe default

sv.set_publication_style(palette="npg")      # Nature
sv.set_publication_style(palette="lancet")   # The Lancet

The same UMAP, coloured with each palette:

https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_npg.png
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_aaas.png
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_nejm.png
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_lancet.png
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_jama.png
https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/pal_okabe-ito.png

Swatches#

https://raw.githubusercontent.com/xuan13hao/scPyviewer/main/docs/images/palettes.png

Continuous data (gene expression, heatmaps) uses the perceptually-uniform, colour-blind-safe viridis by default; pass cmap="cividis" for maximal CVD-safety, or any Matplotlib colormap. See get_palette() and set_publication_style().