matplotlib-publication-plot

Generate publication-quality Matplotlib plots with LaTeX integration and PNG, PDF, and PGF outputs.

Updated Feb 17, 2023
One-click install
npx skills add https://github.com/DoeringChristian/dotfiles --skill matplotlib-publication-plot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matplotlib-publication-plot
Source: https://github.com/DoeringChristian/dotfiles/tree/main/common/.claude/skills/matplotlib-publication-plot
Command: npx skills add https://github.com/DoeringChristian/dotfiles --skill matplotlib-publication-plot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of publication-quality plots using Matplotlib, ensuring they are correctly formatted for academic papers and theses with LaTeX integration.

Core Features & Use Cases

  • Generates figures saved in PNG, PDF, and PGF formats.
  • Integrates seamlessly with LaTeX, using Computer Modern font and lualatex.
  • Provides detailed guidance on critical pitfalls and best practices for Matplotlib's LaTeX backend.
  • Use when you need to create figures for a thesis, paper, or publication, especially when LaTeX rendering or production-ready output is required.

Quick Start

Use the matplotlib-publication-plot skill to create a plot with the provided data and save it as PNG, PDF, and PGF.

Frequently Asked Questions about matplotlib-publication-plot

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

FAQPage Schema
How do I create publication-ready plots in Python with LaTeX font rendering?

Publication-ready plots with LaTeX font rendering are generated using Matplotlib's LaTeX backend, configured with lualatex and the Computer Modern font. This ensures consistent, professional typography across PNG, PDF, and PGF outputs for academic papers.

What is the best way to save Matplotlib figures as PGF for LaTeX documents?

Saving Matplotlib figures as PGF for LaTeX documents is best achieved by configuring the PGF backend with lualatex. This embeds the Computer Modern font directly, avoiding common font embedding pitfalls and ensuring seamless LaTeX integration.

Do I need LaTeX installed to generate academic plots with Matplotlib?

A LaTeX distribution supporting lualatex is indeed required to generate academic plots with Matplotlib using this approach. The Skill relies on LaTeX integration to render the Computer Modern font and output PGF formats correctly.

Why does my Matplotlib LaTeX backend output have missing or incorrectly embedded fonts?

Missing or incorrectly embedded fonts in Matplotlib LaTeX backend output occur due to backend misconfigurations or missing system fonts. Utilizing lualatex with the Computer Modern font setup addresses these common pitfalls and ensures correct font embedding in PDFs and PGFs.

Can I use Matplotlib to output both PDF and PNG files for the same scientific figure?

Matplotlib can indeed output both PDF and PNG files for the same scientific figure. The Skill automates generating publication-quality plots and saving them simultaneously in PNG, PDF, and PGF formats for various publication requirements.