python-origin-plotting
/python-origin-plotting
Automate OriginPro figure generation from Excel or CSV data through Python originpro. Use when an agent needs to create, reproduce, or refine Origin/OriginPro .opju projects, publication PNG/TIFF exports, worksheet import pipelines, grouped bar charts, dual-axis charts, scatter/line plots, or chart styling scripts using Python-driven Origin automation.
- Author
- gerry2024-hub ↗
- Licence
- MIT
- Last repository change
- 30.04.2026
Assessment and security
- Files in this package
- 5
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 30.04.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/originpro_plot_template.py
What it does and when to use it
Automate OriginPro figure generation from Excel or CSV data through Python originpro. Use when an agent needs to create, reproduce, or refine Origin/OriginPro .opju projects, publication PNG/TIFF exports, worksheet import pipelines, grouped bar charts, dual-axis charts, scatter/line plots, or chart styling scripts using Python-driven Origin automation.
Original author description
Automate OriginPro figure generation from Excel or CSV data through Python originpro. Use when an agent needs to create, reproduce, or refine Origin/OriginPro .opju projects, publication PNG/TIFF exports, worksheet import pipelines, grouped bar charts, dual-axis charts, scatter/line plots, or chart styling scripts using Python-driven Origin automation.
How it works
- Prerequisites
- Security Notes
- First Pass
- Standard Workflow
- References
- Validation Checklist
SKILL.md preview
---
name: python-origin-plotting
description: >
Automate OriginPro figure generation from Excel or CSV data through Python originpro.
Use when an agent needs to create, reproduce, or refine Origin/OriginPro .opju
projects, publication PNG/TIFF exports, worksheet import pipelines, grouped bar
charts, dual-axis charts, scatter/line plots, or chart styling scripts using
Python-driven Origin automation.
metadata:
openclaw:
requires:
bins:
- python
env: []
os:
- windows
homepage: https://github.com/Gerry2024-hub/Gerry2024-hub-python-origin-plotting-skill
category: data-visualization
emoji: "📊"
---
# Python Origin Plotting
Use this skill to turn tabular data and plotting requirements into reproducible OriginPro projects driven by Python `originpro`.
## Prerequisites
- Windows with OriginPro installed and licensed.
- Python that can import `originpro` and `pandas`.
- Input data supplied by the user as Excel or CSV.
- No API keys or secret environment variables are required.
## Security Notes
- Inspect `scripts/originpro_plot_template.py` before running it in a new environment.
- Do not commit or publish user data files, generated figures, audit CSV files, or `.opju` projects.
- Keep script outputs inside the user-selected project/output folder and an explicit temp folder such as `E:/origin_tmp`.
- Do not download remote code or send user data to network services as part of this skill.
## First Pass
1. Locate existing artifacts before writing code:
- `*origin*.py`, `*.opju`, `*.opj`, `plots_origin/`, exported `Origin_*.png`
- PowerShell: `Get-ChildItem -Recurse -File -Include *origin*.py,*.opju,*.opj,*.png`
2. Identify the input file, sheet name, required columns, desired chart types, output folder, and whether Origin should be visible.
3. Reuse any existing project script style first, especially workbook setup, LabTalk styling, export naming, and temp-path handling.
4. For a new project, copy and adapt `scripts/originpro_plot_template.py`.
## Standard Workflow
1. Load and clean data with `pandas`.
- Read Excel or CSV.
- Drop rows missing required plotting columns.
- Sort data in the expected visual order.
- Create short axis labels while preserving long labels in separate worksheet columns.
- Export an audit CSV such as `origin_input_data_sorted.csv` with `encoding="utf-8-sig"`.
2. Start a clean Origin project.
- `import originpro as op`
- `op.set_show(True)` when the user should see Origin.
- `op.new()` before creating new workbooks and graph pages.
- Create a workbook with `op.new_book(...)`, write the DataFrame with `wks.from_df(df)`, then set column designations and labels.
3. Create graphs in Origin.
- Use Origin graph pages and layers rather than matplotlib when the user asks for Origin output.
- Add plots with `gl.add_plot(wks, coly=..., colx=..., type=...)`.
- For dual-axis charts, add a second layer and explicitly manage right-Y axis titles and limits.
4. Style through Origin APIs and LabTalk.
- Set axis titles with `gl.axis("x").title` and `gl.axis("y").title`.
- Use `gl.lt_exec(...)` or `gp.lt_exec(...)` for labels, legends, grids, tick rotation, and template-specific styling.
- Call `gl.rescale()` after adding plots.
- Avoid graph titles when they overlap exports; prefer page long names and filenames.
5. Export figures and save the Origin project.
- Export PNG/TIFF with `gp.save_fig(...)`.
- Save `.opju` with `op.save(...)`.
- If output paths contain Chinese characters or Origin refuses direct export, save first to an ASCII temp directory, then copy to the final path.
- Use timestamped or versioned `.opju` names if the final project file may be locked.
6. Close Origin cleanly.
- Put save/export logic in `try`.
- Put `op.exit()` in `finally`.
- Do not leave hidden Origin COM sessions running.
## References
Read these only when needed:
- `references/originpro-workflow.md`: detailed implementation patterns, chart recipes, and script structure.
- `references/troubleshooting.md`: common `originpro`, COM, Chinese-path, export, and locked-file failures.
## Validation Checklist
- The script runs without Python exceptions on the target machine.
- Output folder contains an audit CSV, exported figure files, and a saved `.opju`.
- Figure files are non-empty and have recent modification times.
- The `.opju` opens in Origin and contains the worksheet plus graph pages.
- If Origin or `originpro` is not installed, say so clearly and do not fake Origin output with matplotlib unless the user asks for a fallback.
Files in this package (5)
- SKILL.md 5 KB
- agents/openai.yaml 1 KB
- references/originpro-workflow.md 3 KB
- references/troubleshooting.md 1 KB
- scripts/originpro_plot_template.py 4 KB
Versions
The database has no other skills named python-origin-plotting.
Database snapshot: 13.11.2026 · package version c7b6fdb71263 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100origin-cli
用本机 Origin(OriginPro)画论文级科研数据图:点线图、散点图、柱状图(分组/堆叠/重叠/花纹填充)、热力图(带色标)、柱线组合的双纵轴图、误差棒、断轴、对数轴、分类横轴、局部放大插图与括注标注。写一份 JSON spec 就能得到可编辑的 .opju 和 PNG/TIF/PDF/EMF/SVG。配色、符号形状与填充、符号逐级放大、图例放在每个子图框内底部居中并自动避让曲线等审美规则,已从参考图学好并自动套用;另有学自 IEEE 期刊文献的 JSAC… - 90origin-science-figures
Create, restyle, or audit editable Origin/OriginPro scientific figures, especially dual-Y heat-capacity, entropy, and magnetocaloric plots. Use for data rebinding, baseline and extrapolation checks, axis conversions, and publication export. - 90editaplot
Analyze local scientific CSV, TXT, XLS, or XLSX data; recommend publication-informed charts and Chinese scientific palettes; freeze a reproducible plan; and automate editable figures through a callable local Origin/OriginPro installation on physical Windows 10/11 x64. Use for… - 98origin-auto-skill
Drive OriginLab Origin via COM automation to create publication-grade scientific figures from CSV/Excel data. Use when the user asks for Origin plots (.opju source files), says "用Origin画图", "Origin绘图", "科研绘图", "出版级图表", or needs journal-submission figures that must NOT be made… - 85editaplot
Analyze local scientific CSV, TXT, XLS, or XLSX data; recommend publication-informed charts and Chinese scientific palettes; freeze a reproducible plan; and automate editable figures through a callable local Origin/OriginPro installation on physical Windows 10/11 x64. Use for… - 90editaplot
Analyze local scientific CSV, TXT, XLS, or XLSX data; recommend publication-informed charts and Chinese scientific palettes; freeze a reproducible plan; and automate editable figures through a callable local Origin/OriginPro installation on physical Windows 10/11 x64. Use for…