stata-style-figures

Solid

Style every matplotlib figure like the Stata 18/19 default (stcolor) scheme — Arial embedded as TrueType, white background, recessive light-gray grid below the data, no top/right spines, unframed legends, and the validated blue/red/gray palette. Use whenever a task generates or restyles charts, plots, or figures for papers, reports, or slides, even if the user doesn't mention Stata — this is the house style for all publication figures. Also use when asked to make figures "look like Stata", match the stcolor scheme, or restyle existing matplotlib output.

Data & Documents 57 stars 0 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
59
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Stata-style (stcolor) matplotlib figures House style for publication figures, extracted from validated generators. Paste the rcParams block, use the palette constants, follow the grid rule, and never let a restyle change data content. ## rcParams — paste at the top of every figure script ```python plt.rcParams.update({ "font.family": "sans-serif", "font.sans-serif": ["Arial", "Helvetica", "DejaVu Sans"], "mathtext.fontset": "custom", "mathtext.rm": "Arial", "mathtext.it": "Arial:italic", "mathtext.bf": "Arial:bold", "pdf.fonttype": 42, "ps.fonttype": 42, # embed fonts as TrueType "font.size": 9, "axes.linewidth": 0.6, "axes.edgecolor": "0.2", "axes.spines.top": False, "axes.spines.right": False, "axes.axisbelow": True, }) ``` `font.size` 9 for single/1x2 panels; drop to 8.5 when panels are dense (many tick labels). Figure width 6.5 in = `\textwidth` at 1-inch margins; include at `width=\textwidth` so fonts render at stated size (no downscaling). ## Palette ```python STC_BLUE = "#1f77b4" # protagonist series STC_RED = "#d62728" # accent / contrast series STC_GRAY = "0.62" # de-emphasised series STC_BLUE_LIGHT = "#c1d9ec" # shaded bands / intervals (light step of the blue) STC_GRID = "#e3e6e8" # gridlines ``` Baseline-vs-corrected comparisons: dashed gray baseline (`color="0.50", ls="--"`) vs solid blue corrected. Background/context shading: `axvspan(..., color="0.93")`. ## Per-axes styling ```python...

Details

Author
kennethkhoocy
Repository
kennethkhoocy/applied-micro-skills
Created
6 days ago
Last Updated
5 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

figure-style

Publication-grade figure correctness and legibility rules. Load before drawing any plot and call `apply_figure_style()` — sets a role-mapped font-size ladder, outward ticks, frameless legends, and 300-dpi output. The skill is a checklist, not a house look: data fidelity (claim-titles tested against every row, excluded data never enters summaries), label economy (floor and ceiling), colour threading, chart-choice-by-data-shape, layout, and a render-then-verify QA loop (bbox collision + per-panel perceptual check). Ships helpers: focal_palette, bar_with_points, strip_with_median, end_of_line_labels, panel_letter, set_frame, panel_crops. For multi-panel figures load `figure-composer`; for whole-paper figure arc load `paper-narrative`.

3 Updated today
emaballarin
Data & Documents Solid

matplotlib-scientific-plotting

Low-level Python plotting for scientific figures: publication-quality line, scatter, bar, heatmap, contour, 3D; multi-panel layouts; fine control of every element. PNG/PDF/SVG export. Use seaborn for quick stats, plotly for interactive.

286 Updated 4 days ago
jaechang-hits
DevOps & Infrastructure Featured

scientific-visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

726 Updated 1 weeks ago
LeonChaoX