简介
Pythesis Plot
原始描述
Python scientific plotting tool for thesis/dissertation scenarios. Workflow: data upload → analysis → recommendations → confirmation → generation. Triggers w...
通过你的 Agent 添加
安装目录:pythesis-plot/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: pythesis-plot
description: >
Python scientific plotting tool for thesis/dissertation scenarios.
Workflow: data upload → analysis → recommendations → confirmation → generation.
Triggers when users upload data files (CSV/Excel/TXT) and ask for plots,
charts, figures, or data visualization for academic publications.
PyThesisPlot
Python scientific plotting workflow tool supporting the complete process from data upload to figure generation for academic publications.
Workflow
[User Uploads Data] → [Auto-save to output dir] → [Data Analysis]
↓
[Generate Images to output dir] ← [Code Generation] ← [User Confirms Scheme]
Required Steps
[User Uploads Data] → [Auto-save to output dir] → [Data Analysis]
↓
[Generate Images to output dir] ← [Code Generation] ← [User Confirms Scheme]
- Data Reception: User uploads data file (txt/md/xlsx/csv)
- Auto-save: Rename to
timestamp-original_filename, save tooutput/YYYYMMDD-filename/ - Data Analysis: Analyze dimensions, types, statistical features, column relationships
- Chart Recommendations: Recommend chart schemes based on data characteristics (type, quantity, layout)
- User Confirmation: Display analysis report, must wait for user confirmation before generation
- Generation & Delivery: Python code + chart images, save to same output directory
Core Scripts
1. Main Workflow Script
python scripts/workflow.py --input data.csv --output-dir output/
2. Data Analysis
python scripts/data_analyzer.py --input data.csv
python scripts/data_analyzer.py --input data.csv
Output: Data characteristics report + chart recommendation scheme
3. Chart Generation
python scripts/plot_generator.py --config plot_config.json --output-dir output/
File Management Standards
Directory Structure
output/
└── 20250312-145230-data.csv/ # Named with timestamp + filename
├── 20250312-145230-data.csv # Original data file (renamed)
├── analysis_report.md # Data analysis report
├── plot_config.json # Chart configuration (generated after user confirmation)
├── 20250312-145230_plot.py # Generated Python code
├── 20250312-145230_fig1_line.png # Chart (PNG image)
└── 20250312-145230_fig2_bar.png
Naming Conventions
File Type
Naming Format
Example
Data File
{timestamp}-{original}
20250312-145230-data.csv
Analysis Report
analysis_report.md
analysis_report.md
Python Code
{timestamp}_plot.py
20250312-145230_plot.py
Chart PNG
{timestamp}_fig{n}_{type}.png
20250312-145230_fig1_line.png
Usage
Scenario 1: Complete Workflow
python scripts/plot_generator.py --config plot_config.json --output-dir output/
Directory Structure
output/
└── 20250312-145230-data.csv/ # Named with timestamp + filename
├── 20250312-145230-data.csv # Original data file (renamed)
├── analysis_report.md # Data analysis report
├── plot_config.json # Chart configuration (generated after user confirmation)
├── 20250312-145230_plot.py # Generated Python code
├── 20250312-145230_fig1_line.png # Chart (PNG image)
└── 20250312-145230_fig2_bar.png
| File Type | Naming Format | Example |
|---|---|---|
| Data File | {timestamp}-{original} |
20250312-145230-data.csv |
| Analysis Report | analysis_report.md |
analysis_report.md |
| Python Code | {timestamp}_plot.py |
20250312-145230_plot.py |
| Chart PNG | {timestamp}_fig{n}_{type}.png |
20250312-145230_fig1_line.png |
Usage
Scenario 1: Complete Workflow
When user uploads a data file:
-
Auto-save File
# Rename and save to output/{timestamp}-{filename}/ save_uploaded_file(input_file, output_base="output/") -
Execute Data Analysis
# Analyze data characteristics, generate report python scripts/data_analyzer.py --input output/20250312-data/data.csv -
Display Analysis Report to User
## Data Analysis Report ### Data Overview - File: data.csv - Dimensions: 120 rows × 5 columns - Types: 3 numeric + 2 categorical columns ### Column Details | Column | Type | Description | |-----|------|-----| | date | datetime | 2023-01 to 2023-12 | | sales | numeric | mean=1250, std=320 | | region | categorical | 4 categories: N/S/E/W | ### Chart Recommendations Based on data characteristics, the following schemes are recommended: **Scheme 1: Time Trend Analysis** ⭐Recommended - Chart Type: Line plot - Content: Sales trend over time - Reason: Time series data, most intuitive for showing trends **Scheme 2: Regional Comparison** - Chart Type: Grouped bar chart - Content: Sales comparison across regions - Reason: Categorical comparison, suitable for showing differences **Scheme 3: Comprehensive Dashboard** - Chart Type: 2×2 subplot layout - Includes: Trend line + Bar chart + Box plot + Correlation heatmap - Reason: Rich data dimensions, comprehensive display Please tell me what you want: - "Generate schemes 1 and 2" - "Generate all" - "Modify scheme 3..." (provide your modification suggestions) -
Wait for User Confirmation ⚠️ Critical Step
- User may say: "Generate scheme 1" / "Generate all" / "Modify XX..."
- Must wait for explicit instruction before entering generation phase
-
Generate and Save
# Generate Python code python scripts/plot_generator.py --config plot_config.json # Output to same directory output/20250312-data/ ├── 20250312-145230_plot.py # Code ├── 20250312-145230_fig1_line.png # Chart └── 20250312-145230_fig2_bar.png
Scenario 2: Data Analysis Only
python scripts/data_analyzer.py --input data.csv --output report.md
Scenario 3: Generate from Config
python scripts/plot_generator.py --config config.json --output-dir ./
Chart Recommendation Logic
Data Characteristics
Recommended Chart
Application
Time series + Numeric
Line plot
Trend display
Categorical + Single numeric
Bar chart
Category comparison
Categorical + Distribution
Box/Violin plot
Distribution display
Two numeric (correlated)
Scatter (+regression)
Correlation analysis
Multiple numeric (correlated)
Heatmap
Correlation matrix
Single numeric distribution
Histogram/Density
Distribution characteristics
Multi-dimensional rich data
2×2 subplots
Comprehensive display
Supported File Formats
- CSV:
.csv (Recommended)
- Excel:
.xlsx, .xls
- Text:
.txt, .md (table format)
Dependencies
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
Reference Documents
- Workflow Guide - Complete workflow instructions
- Chart Types - Detailed chart type descriptions
- Style Guide - Color schemes, fonts, size standards
- Examples - Complete code examples
Important Notes
- User confirmation is mandatory: Must wait for user confirmation after analysis, cannot generate directly
- Unified file management: All output files saved to same output/{timestamp}-{filename}/ directory
- High-resolution output: Generate PNG at 300 DPI (suitable for publication)
- Code traceability: Generated Python code also saved to same directory for user modification
- Academic style: Charts follow top journal standards (Nature/Science/Lancet style)
python scripts/data_analyzer.py --input data.csv --output report.md
python scripts/plot_generator.py --config config.json --output-dir ./
Chart Recommendation Logic
Data Characteristics
Recommended Chart
Application
Time series + Numeric
Line plot
Trend display
Categorical + Single numeric
Bar chart
Category comparison
Categorical + Distribution
Box/Violin plot
Distribution display
Two numeric (correlated)
Scatter (+regression)
Correlation analysis
Multiple numeric (correlated)
Heatmap
Correlation matrix
Single numeric distribution
Histogram/Density
Distribution characteristics
Multi-dimensional rich data
2×2 subplots
Comprehensive display
Supported File Formats
- CSV:
.csv (Recommended)
- Excel:
.xlsx, .xls
- Text:
.txt, .md (table format)
Dependencies
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
Reference Documents
- Workflow Guide - Complete workflow instructions
- Chart Types - Detailed chart type descriptions
- Style Guide - Color schemes, fonts, size standards
- Examples - Complete code examples
Important Notes
- User confirmation is mandatory: Must wait for user confirmation after analysis, cannot generate directly
- Unified file management: All output files saved to same output/{timestamp}-{filename}/ directory
- High-resolution output: Generate PNG at 300 DPI (suitable for publication)
- Code traceability: Generated Python code also saved to same directory for user modification
- Academic style: Charts follow top journal standards (Nature/Science/Lancet style)
| Data Characteristics | Recommended Chart | Application |
|---|---|---|
| Time series + Numeric | Line plot | Trend display |
| Categorical + Single numeric | Bar chart | Category comparison |
| Categorical + Distribution | Box/Violin plot | Distribution display |
| Two numeric (correlated) | Scatter (+regression) | Correlation analysis |
| Multiple numeric (correlated) | Heatmap | Correlation matrix |
| Single numeric distribution | Histogram/Density | Distribution characteristics |
| Multi-dimensional rich data | 2×2 subplots | Comprehensive display |
- CSV:
.csv(Recommended) - Excel:
.xlsx,.xls - Text:
.txt,.md(table format)
Dependencies
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
Reference Documents
- Workflow Guide - Complete workflow instructions
- Chart Types - Detailed chart type descriptions
- Style Guide - Color schemes, fonts, size standards
- Examples - Complete code examples
Important Notes
- User confirmation is mandatory: Must wait for user confirmation after analysis, cannot generate directly
- Unified file management: All output files saved to same output/{timestamp}-{filename}/ directory
- High-resolution output: Generate PNG at 300 DPI (suitable for publication)
- Code traceability: Generated Python code also saved to same directory for user modification
- Academic style: Charts follow top journal standards (Nature/Science/Lancet style)
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
- Workflow Guide - Complete workflow instructions
- Chart Types - Detailed chart type descriptions
- Style Guide - Color schemes, fonts, size standards
- Examples - Complete code examples
Important Notes
- User confirmation is mandatory: Must wait for user confirmation after analysis, cannot generate directly
- Unified file management: All output files saved to same output/{timestamp}-{filename}/ directory
- High-resolution output: Generate PNG at 300 DPI (suitable for publication)
- Code traceability: Generated Python code also saved to same directory for user modification
- Academic style: Charts follow top journal standards (Nature/Science/Lancet style)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。