plotting

Generate publication-grade heatmaps, scatter plots, stripcharts, boxplots, and density plots in R and Python.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/ppavlidis/skillz --skill plotting-ppavlidis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plotting
Source: https://github.com/ppavlidis/skillz/tree/main/skills/plotting
Command: npx skills add https://github.com/ppavlidis/skillz --skill plotting-ppavlidis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, seaborn, numpy, pandas, scipy.

What problem does it solve? Scientific figures made ad hoc end up visually inconsistent across a paper or thesis — different palettes, clustering choices, label handling, and axis conventions. This Skill encodes one lab's publication-figure defaults as reusable R and Python functions so every heatmap, scatter, stripchart, boxplot, and density plot follows the same conventions automatically. ## Core Features & Use Cases - pavlab_heatmap: Wraps pheatmap (R) and seaborn.heatmap (Python) with expression/correlation/raw modes, row Z-scoring with ±3 clipping, a black-centered divergent palette, grey NA cells, and automatic label hiding for large matrices. - pavlab_scatter, pavlab_stripchart, pavlab_boxplot, pavlab_density: Distributional and two-variable plots with N-adaptive rendering (solid points → alpha blending → hexbin), log2/log10 axis handling, swarm or jitter point layouts, and optional grand mean/median reference lines. - Shared palettes and style rules: Byte-identical divergent and black-body sequential palettes in both languages, plus cross-plot rules (no gridlines, outward ticks, SD-or-CI95 error bars, never SEM). - Use Case: A researcher needs a sample–sample correlation heatmap for a paper figure; calling pavlab_heatmap(cor_df, mode="correlation") produces a diagonal-masked, correctly-paletted PDF with no manual tuning. ## Quick Start Ask the AI to create a publication-quality heatmap of your expression matrix using the plotting skill's pavlab_heatmap function with default lab styling.

Frequently Asked Questions about plotting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a publication-quality heatmap in Python or R?

Call pavlab_heatmap with your matrix; it wraps seaborn.heatmap in Python and pheatmap in R. Expression mode row-standardizes to Z-scores clipped at ±3, correlation mode blanks the diagonal, and raw mode picks a sequential palette when all values are non-negative.

How to plot a scatter plot with log2 axes in matplotlib?

Use pavlab_scatter with log_x="log2" and log_y="log2"; the data is pre-transformed with a pseudocount of 1 and axis labels gain a log suffix automatically. If data spans more than 100× without a transform, a warning suggests the appropriate log scale.

What is the difference between strip and swarm point layouts?

Strip applies uniform random horizontal jitter and suits small-to-medium groups up to roughly 200 points. Swarm packs points non-overlappingly so distribution shape stays legible, but becomes expensive above a few thousand points per group, where a density plot is preferable.

Does pavlab_heatmap support clustering rows and columns?

The R version accepts cluster_rows and cluster_cols passed through to pheatmap, but both default to FALSE by lab convention. The Python version raises NotImplementedError for clustering and directs you to seaborn's clustermap instead.

When should I not use these plotting helpers?

Avoid them for exploratory clustering-driven heatmap analysis, interactive visualization (use plotly or heatmaply), and annotated multi-track heatmaps (use ComplexHeatmap in R). The helpers encode fixed publication defaults rather than exploratory flexibility.

Why are missing values shown as grey in the heatmaps?

NA cells are hardcoded to grey (grey80 in R, #cccccc in Python) so missing data is never confused with a near-zero value in the divergent palette, whose midpoint is black. This is a deliberate design contract of the skill.