← 返回
数据分析

Pythesis Plot

Python scientific plotting tool for thesis/dissertation scenarios. Workflow: data upload → analysis → recommendations → confirmation → generation. Triggers w...
Python学位论文科学绘图工具。工作流:数据上传→分析→推荐→确认→生成。
stephenlzc
数据分析 clawhub v1.0.3 1 版本 100000 Key: 无需
★ 0
Stars
📥 798
下载
💾 108
安装
1
版本
#latest

概述

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

  1. Data Reception: User uploads data file (txt/md/xlsx/csv)
  2. Auto-save: Rename to timestamp-original_filename, save to output/YYYYMMDD-filename/
  3. Data Analysis: Analyze dimensions, types, statistical features, column relationships
  4. Chart Recommendations: Recommend chart schemes based on data characteristics (type, quantity, layout)
  5. User Confirmation: Display analysis report, must wait for user confirmation before generation
  6. 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

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 TypeNaming FormatExample
------------------------
Data File{timestamp}-{original}20250312-145230-data.csv
Analysis Reportanalysis_report.mdanalysis_report.md
Python Code{timestamp}_plot.py20250312-145230_plot.py
Chart PNG{timestamp}_fig{n}_{type}.png20250312-145230_fig1_line.png

Usage

Scenario 1: Complete Workflow

When user uploads a data file:

  1. Auto-save File

```python

# Rename and save to output/{timestamp}-{filename}/

save_uploaded_file(input_file, output_base="output/")

```

  1. Execute Data Analysis

```python

# Analyze data characteristics, generate report

python scripts/data_analyzer.py --input output/20250312-data/data.csv

```

  1. Display Analysis Report to User

```markdown

## 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)

```

  1. 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
  1. Generate and Save

```python

# 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 CharacteristicsRecommended ChartApplication
---------------------------
Time series + NumericLine plotTrend display
Categorical + Single numericBar chartCategory comparison
Categorical + DistributionBox/Violin plotDistribution display
Two numeric (correlated)Scatter (+regression)Correlation analysis
Multiple numeric (correlated)HeatmapCorrelation matrix
Single numeric distributionHistogram/DensityDistribution characteristics
Multi-dimensional rich data2×2 subplotsComprehensive 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

Important Notes

  1. User confirmation is mandatory: Must wait for user confirmation after analysis, cannot generate directly
  2. Unified file management: All output files saved to same output/{timestamp}-{filename}/ directory
  3. High-resolution output: Generate PNG at 300 DPI (suitable for publication)
  4. Code traceability: Generated Python code also saved to same directory for user modification
  5. Academic style: Charts follow top journal standards (Nature/Science/Lancet style)

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-03-18 23:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 366 📥 139,941
developer-tools

Literature Reviewer Skill

stephenlzc
根据用户提供的论文主题,进行系统性中英文文献回顾(Literature Survey)。 采用8阶段工作流,支持CNKI、Web of Science、ScienceDirect等主流数据库, 无需API配置,通过浏览器自动化获取文献信息。
★ 0 📥 1,985
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 162 📥 59,658