Professional Scientific Plotting for Academic Publications
From Data to Publication-Ready Figures in Minutes
|
|
# Clone the skill
git clone https://github.com/stephenlzc/pythesis-plot.git
cd pythesis-plot
# Install dependencies
pip install pandas matplotlib seaborn openpyxl numpy scipypython scripts/workflow.py --input your_data.csvThis will:
- 📁 Create organized output directory
- 🔍 Analyze your data automatically
- 💡 Recommend chart schemes
- ⏳ Wait for your confirmation
- 🎨 Generate publication-ready figures
python scripts/data_analyzer.py --input your_data.csvpython scripts/plot_generator.py --config plot_config.json- Workflow Guide - Complete workflow walkthrough
- Chart Types - Available chart types and when to use them
- Style Guide - Color schemes, fonts, and layout standards
- Examples - Code examples for common scenarios
| Chart Type | Best For | Example |
|---|---|---|
| 📈 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 |
Data: Mouse PCOS model with BRAC1 gene expression (108 samples, 3 groups)
Generated Figures:
- Body weight comparison with significance markers
- Ovary weight analysis
- BRAC1 relative expression (log scale)
- qPCR Ct value distributions
- Comprehensive 2×2 dashboard
Key Finding: BRAC1 expression downregulated 55× in PCOS model (p<0.001)
python scripts/workflow.py --input Mouse_PCOS_BRAC1_RawData_108.xlsxData: Adolescent mental health intervention (1200 participants, 4 groups)
Generated Figures:
- CONSORT-style study overview
- SDQ pre/post comparison
- Responder analysis (0.3% → 61.3%)
- Dose-response relationship
- 6-panel comprehensive dashboard
Key Finding: Combined CBT+Mindfulness intervention achieved 61.3% response rate
python scripts/workflow.py --input Adolescent_Mental_Health_Intervention_1200.xlsxpythesis-plot/
├── 📄 SKILL.md # Skill definition
├── 📁 scripts/
│ ├── 🔄 workflow.py # Main workflow orchestrator
│ ├── 🔍 data_analyzer.py # Data analysis engine
│ └── 🎨 plot_generator.py # Chart generation engine
├── 📁 references/
│ ├── 📖 workflow_guide.md # Workflow documentation
│ ├── 📊 chart_types.md # Chart type guide
│ ├── 🎨 style_guide.md # Visual style standards
│ └── 💻 examples.md # Code examples
├── 📁 assets/themes/
│ ├── 🎓 academic.mplstyle # Academic style theme
│ ├── 🔬 nature.mplstyle # Nature journal style
│ └── 📊 presentation.mplstyle # Presentation style
└── 📁 output/ # Generated outputs
graph TD
A[📤 User Uploads Data] --> B[📁 Auto-save to Output]
B --> C[🔍 Data Analysis]
C --> D[💡 Chart Recommendations]
D --> E{⏳ User Confirmation}
E -->|Confirm| F[🎨 Generate Charts]
E -->|Modify| D
F --> G[✅ Delivery]
style A fill:#e1f5fe
style E fill:#fff3e0
style G fill:#e8f5e9
- Automatic file renaming with timestamp
- Organized directory creation
- Support for CSV, Excel, TXT, Markdown
- Automatic dimension detection
- Column type identification (numeric/categorical/datetime)
- Statistical summary generation
- Relationship analysis
- AI-powered chart type suggestions
- Layout recommendations
- Statistical test suggestions
- CRITICAL: Must wait for explicit confirmation
- Interactive modification support
- Preview recommendations
- High-resolution PNG generation (300 DPI)
- Reproducible Python code output
- Organized file management
[dependencies]
python = ">=3.8"
pandas = ">=1.3.0"
matplotlib = ">=3.5.0"
seaborn = ">=0.11.0"
openpyxl = ">=3.0.0" # Excel support
numpy = ">=1.20.0"
scipy = ">=1.7.0"Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 🎨 Color palettes inspired by Nature and Science style guides
- 📊 Statistical visualization best practices from Seaborn
- 🎓 Academic plotting standards from Matplotlib