Back to Blog

data-analysis

Stata-Style Figures: Consistent Publication Charts

Ensure every matplotlib chart matches Stata's stcolor scheme with this agent skill—perfect for papers, reports, and slides.

OpenAgentSkillPublished:

Where this fits

You're an applied economist finalizing a regression table and chart for a working paper. The journal expects Stata's default look—Arial, light gray grid, no top/right spines—but you're generating figures in Python. Manually tweaking rcParams for every plot is error-prone and inconsistent. This skill encodes the validated stcolor style so any agent can apply it automatically, whether or not you mention Stata. It turns a repetitive styling chore into a one-line prompt.

Why agents benefit

  • Applies consistent styling without prompting — The skill triggers on any figure-generation task, even when the user doesn't explicitly ask for Stata styling, because it's the house style for publication outputs.
  • Embeds Arial as TrueType — Ensures font fidelity across PDF and PNG exports, eliminating missing-font issues in collaborative workflows.
  • Handles grid and spine removal automatically — No need to write ax.spines['top'].set_visible(False) or set grid alpha manually; the skill injects the correct rcParams and palette.
  • Uses a validated blue/red/gray palette — Avoids arbitrary color choices that clash with print or presentation themes, matching Stata's stcolor scheme exactly.
  • Restyles without changing data — The skill only modifies visual parameters, so the underlying data and plot content remain untouched, preserving analytical integrity.

Practical scenarios

Generating a new figure for a regression appendix

An agent is asked to create a coefficient plot from a fitted model. Instead of a generic matplotlib style, it applies the Stata-style skill, producing a clean chart with recessive gridlines and unframed legend—ready for submission.

Restyling an existing matplotlib plot from a legacy script

A colleague shares a Python script that generates a histogram with default styling. The agent reads the script, injects the skill's rcParams block, and re-renders the figure to match the publication standard without touching the data pipeline.

Matching Stata output for a team presentation

A consulting team needs all charts in a quarterly report to look uniform, even though some are generated in Python and others in Stata. The agent applies the skill to every Python figure, ensuring visual consistency across the deck.

Add it to your agent workflow

Install the skill with:

npx skills add kennethkhoocy/applied-micro-skills --skill stata-style-figures

After adding, your agent can simply call the skill when a figure task is detected. For example, prompt: "Create a scatter plot of GDP vs. life expectancy for the report." The skill automatically applies the Stata-style rcParams and palette, producing a publication-ready figure without further instruction.

For more context on this skill and its ecosystem, visit OpenAgentSkill.

Compare before adopting

Before integrating, compare against these dimensions:

  • Quality signals — Check the README for validated generators and the palette definition; a well-documented skill is more reliable.
  • Maintenance freshness — Review the repository's last commit date and issue activity. A stale skill may break with newer matplotlib versions.
  • Alternatives — You could write a custom matplotlib stylesheet or use seaborn themes, but they won't match Stata's exact stcolor scheme without extra work.
  • Workflow fit — Ensure the skill's trigger conditions align with your agent's typical tasks (papers, reports, slides) and that it doesn't conflict with other styling preferences.

Why it is worth tracking

With 47 stars and an active author, this skill shows early community traction. Its focus on a specific, widely used publication style makes it a strong candidate for inclusion in any data-analysis agent's toolkit. Monitor the repository for updates—if the author continues to refine the palette and add support for new Stata releases, it becomes a default choice for economic and social-science reporting.

Featured Skill

stata-style-figures

Skill by kennethkhoocy