Skip to content

stephenlzc/pythesis-plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š PyThesisPlot

Scientific Plotting Skill for Claude Code β€” Transform raw data into publication-ready figures with Nature/Science quality standards.

Python 3.8+ License: MIT Release δΈ­ζ–‡


🎯 What is PyThesisPlot?

PyThesisPlot is a Claude Code Skill that teaches AI assistants how to create publication-quality scientific figures from raw data. It provides:

  • πŸ“Š Intelligent Workflow: Data β†’ Analysis β†’ Recommendations β†’ Confirmation β†’ Figures
  • 🎨 Journal-Ready Output: 300 DPI, Nature/Science style compliance
  • πŸ”¬ Multi-Domain Support: Biology, Psychology, Economics, Chemistry
  • πŸ“ Organized Output: Timestamped directories with reproducible code

Trigger: When you upload data files (CSV/Excel/TXT) and ask for plots, charts, or figures.

Supported Platforms: Claude Code Β· OpenCode Β· OpenClaw Β· Kimi CLI Β· Trae Β· Cursor


πŸ“¦ Installation

For Humans

Copy and paste this to your AI assistant:

Install PyThesisPlot skill for me:
https://github.com/stephenlzc/pythesis-plot

Or if you enjoy YAML-induced headaches, read the Installation Guide. But seriously, let the agent handle it. Humans copy-paste paths wrong.

For LLM Agents

Claude Code:

git clone https://github.com/stephenlzc/pythesis-plot.git ~/.claude/skills/pythesis-plot
pip install pandas matplotlib seaborn openpyxl numpy scipy

OpenCode / OpenClaw:

git clone https://github.com/stephenlzc/pythesis-plot.git ~/.opencode/skills/pythesis-plot
pip install pandas matplotlib seaborn openpyxl numpy scipy

Kimi CLI:

git clone https://github.com/stephenlzc/pythesis-plot.git ~/.kimi/skills/pythesis-plot
pip install pandas matplotlib seaborn openpyxl numpy scipy

Trae:

git clone https://github.com/stephenlzc/pythesis-plot.git ~/.trae/skills/pythesis-plot
pip install pandas matplotlib seaborn openpyxl numpy scipy

Full instructions: docs/installation.md


πŸš€ Skip This README

We're past the era of manual plotting. Just paste this into your agent:

I have some data and need publication-ready figures for my thesis. 
Use PyThesisPlot skill to help me:
https://github.com/stephenlzc/pythesis-plot

πŸš€ Quick Start

Once installed, simply upload your data and ask:

"Help me create some charts for my thesis"

"Plot this data for my scientific paper"

"Generate publication-ready figures from this Excel file"

The skill will automatically:

  1. Analyze your data structure and types
  2. Recommend appropriate chart types
  3. Wait for your confirmation on chart selection
  4. Generate 300 DPI PNG figures + reproducible Python code

πŸ“‹ Skill Structure

pythesis-plot/
β”œβ”€β”€ SKILL.md                          # Skill definition (trigger conditions)
β”œβ”€β”€ README.md                         # This file
β”œβ”€β”€ README.zh-CN.md                   # Chinese documentation
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ workflow.py                   # Main orchestrator
β”‚   β”œβ”€β”€ data_analyzer.py              # Data analysis engine
β”‚   └── plot_generator.py             # Figure generation engine
β”œβ”€β”€ references/
β”‚   β”œβ”€β”€ workflow_guide.md             # Workflow documentation
β”‚   β”œβ”€β”€ chart_types.md                # Chart selection guide
β”‚   β”œβ”€β”€ style_guide.md                # Visual standards
β”‚   └── examples.md                   # Code examples
└── assets/themes/
    β”œβ”€β”€ academic.mplstyle             # Academic journal style
    β”œβ”€β”€ nature.mplstyle               # Nature journal style
    └── presentation.mplstyle         # Presentation style

🎨 Supported Chart Types

Chart Type Best For Example Use Case
πŸ“ˆ Line Plot Time series, Trends Gene expression over time
πŸ“Š Bar Chart Group comparisons Treatment vs Control
🎯 Box Plot Distribution, Outliers qPCR Ct values
⚑ Scatter + Regression Correlations Dose-response relationships
πŸ”₯ Heatmap Correlation matrices Multi-gene expression
πŸ“‹ Dashboard Multi-panel figures Complete study overview

πŸ’‘ Example Use Cases

Example 1: Biomedical Research (qPCR Data)

User: "I have qPCR data for my PCOS study. Help me create figures."

AI: Analyzing Mouse_PCOS_BRAC1_RawData_108.xlsx...
    Detected: 108 samples, 3 groups, gene expression data
    
    Recommended Charts:
    1. Body weight comparison (bar chart)
    2. BRAC1 expression levels (log scale bar chart)
    3. qPCR Ct distributions (box plot)
    4. Comprehensive 2Γ—2 dashboard

User: "Generate all of them"

AI: βœ… Generated 4 publication-ready figures in output/20250312-143052-PCOS/

Example 2: Psychology RCT Study

User: "Plot my mental health intervention results"

AI: Analyzing Adolescent_Mental_Health_Intervention_1200.xlsx...
    Detected: 1200 participants, 4-arm RCT, pre/post measurements
    
    Recommended Charts:
    1. CONSORT-style study flow
    2. SDQ pre/post comparison
    3. Responder analysis (stacked bar)
    4. Effect size forest plot

User: "Generate schemes 1, 2, and 3"

AI: βœ… Generated 3 figures with statistical annotations

βš™οΈ How It Works

1. Skill Trigger

The skill activates when the YAML description in SKILL.md matches your request:

---
name: pythesis-plot
description: Python scientific plotting tool... 
  Triggers when users upload data files (txt/md/excel/csv) 
  and mention "help me plot", "create chart", "data visualization", 
  "thesis figure", "scientific plotting"...
---

2. Workflow Stages

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Data Upload │────▢│  Analysis   │────▢│Recommendationsβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                                                β”‚
                                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Delivery  │◀────│ Generation  │◀────│Confirmation β”‚
β”‚  (PNG+Code) β”‚     β”‚             β”‚     β”‚  (Required) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Output Organization

All outputs saved to timestamped directory:

output/
└── 20250312-143052-your-data/
    β”œβ”€β”€ 20250312-143052-your-data.csv    # Original data (renamed)
    β”œβ”€β”€ analysis_report.md               # Data analysis report
    β”œβ”€β”€ plot_config.json                 # Chart configuration
    β”œβ”€β”€ 20250312-143052_plot.py          # Reproducible Python code
    └── *.png                            # 300 DPI figures

πŸ“– Documentation


πŸ”§ Dependencies

pip install pandas matplotlib seaborn openpyxl numpy scipy

🀝 Contributing

Contributions welcome! This skill follows the standard SKILL.md format:

  1. Fork this repository
  2. Modify SKILL.md or add new chart types
  3. Test with sample data
  4. Submit a Pull Request

Skill Format

---
name: pythesis-plot
description: | 
  Clear trigger conditions for when AI should load this skill.
  List specific phrases and contexts.
---

# Skill Body

## Quick Start
Brief instructions...

## Features
- Feature 1
- Feature 2

🌐 Languages


πŸ“„ License

MIT License β€” see LICENSE for details.


πŸ™ Acknowledgments

  • 🎨 Color palettes from Nature and Science style guides
  • πŸ“Š Visualization practices from Seaborn
  • πŸŽ“ Academic standards from Matplotlib

Made with ❀️ for Researchers

⬆ Back to Top