{"id":50749687,"url":"https://github.com/hanlulong/matlab-plot-skill","last_synced_at":"2026-06-11T00:03:05.337Z","repository":{"id":361444658,"uuid":"1189950738","full_name":"hanlulong/matlab-plot-skill","owner":"hanlulong","description":"Fix messy MATLAB figures: publication-quality plots, clean subplot layouts, and PDF export for LaTeX/Overleaf in Codex and Claude Code.","archived":false,"fork":false,"pushed_at":"2026-05-30T16:40:27.000Z","size":172,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T18:11:48.110Z","etag":null,"topics":["claude-code","codex","data-visualization","latex","matlab","matlab-figures","matlab-plotting","overleaf","publication-quality","scientific-figures"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanlulong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-23T20:33:30.000Z","updated_at":"2026-05-30T16:40:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hanlulong/matlab-plot-skill","commit_stats":null,"previous_names":["hanlulong/matlab-plot-skill"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hanlulong/matlab-plot-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanlulong%2Fmatlab-plot-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanlulong%2Fmatlab-plot-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanlulong%2Fmatlab-plot-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanlulong%2Fmatlab-plot-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanlulong","download_url":"https://codeload.github.com/hanlulong/matlab-plot-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanlulong%2Fmatlab-plot-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34175889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","codex","data-visualization","latex","matlab","matlab-figures","matlab-plotting","overleaf","publication-quality","scientific-figures"],"created_at":"2026-06-11T00:03:04.580Z","updated_at":"2026-06-11T00:03:05.333Z","avatar_url":"https://github.com/hanlulong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Publication-Quality MATLAB Figures\n\n`matlab-plot-skill` is a reusable skill for Codex and Claude Code that fixes messy MATLAB figures: cramped layouts, unreadable titles, awkward legends, bad white space, and weak PDF output for LaTeX or Overleaf.\n\nThe key rule is simple: the agent must not stop after writing plotting code. It must generate the figure, export it, read the rendered figure itself, and iterate until the visual result is no longer a mess.\n\n![Demo figure](./examples/output/demo_publication_figure.png)\n\n## Find This Repo If You Searched For\n\n- how to make MATLAB figures look professional\n- publication-quality MATLAB plots\n- fix messy subplot layout in MATLAB\n- export MATLAB figure to PDF for LaTeX\n- MATLAB figures for Overleaf\n- improve MATLAB legend, title, spacing, and white space\n\n## What Problem This Solves\n\n- multi-panel MATLAB figures that look cramped or amateurish\n- legends that steal too much plot area\n- titles that are too long or too small after PDF scaling\n- inconsistent colors and symbols across panels\n- plots that look acceptable in MATLAB but bad once embedded in a paper\n\n## What This Skill Enforces\n\n- MATLAB-first figure cleanup for papers, appendices, and slides\n- vector PDF export for LaTeX and Overleaf workflows\n- better layout choices for multi-panel figures\n- explicit render-review-iterate behavior\n- reusable MATLAB export helper code\n- a quick PNG review path so the agent can read the rendered figure easily\n\n## Repository Layout\n\n- [`matlab-plot-skill/SKILL.md`](./matlab-plot-skill/SKILL.md)\n- [`matlab-plot-skill/scripts/export_publication_figure.m`](./matlab-plot-skill/scripts/export_publication_figure.m)\n- [`matlab-plot-skill/references/render_review_checklist.md`](./matlab-plot-skill/references/render_review_checklist.md)\n- [`matlab-plot-skill/references/matlab_figure_guidelines.md`](./matlab-plot-skill/references/matlab_figure_guidelines.md)\n- [`matlab-plot-skill/agents/openai.yaml`](./matlab-plot-skill/agents/openai.yaml) (Codex UI metadata)\n- [`install.ps1`](./install.ps1)\n- [`install.sh`](./install.sh)\n- [`examples/demo_publication_figure.m`](./examples/demo_publication_figure.m)\n- [`examples/output/demo_publication_figure.png`](./examples/output/demo_publication_figure.png) (committed preview image)\n- [`tools/validate_repo.py`](./tools/validate_repo.py)\n- [`LICENSE`](./LICENSE), [`CITATION.cff`](./CITATION.cff)\n\n## Prerequisites\n\n- MATLAB R2021a or newer. The export helper uses `exportgraphics` (R2020a+) and an `arguments` block (R2019b+); the demo and the documented helper calls use name=value argument syntax (`WidthInches=8.4`), which requires R2021a+.\n- For repo validation only: `uv` (or Python 3 with `pyyaml`).\n\n## Install\n\nClone the repo first (the installers run from the clone):\n\n```bash\ngit clone https://github.com/hanlulong/matlab-plot-skill.git\ncd matlab-plot-skill\n```\n\n### Windows PowerShell\n\nInstall into both Codex and Claude Code skill directories:\n\n```powershell\n.\\install.ps1\n```\n\nInstall only into Codex:\n\n```powershell\n.\\install.ps1 -Target codex\n```\n\nOverwrite an existing installed copy:\n\n```powershell\n.\\install.ps1 -Force\n```\n\n### macOS / Linux\n\n```bash\n./install.sh\n```\n\nInstall only into Claude Code:\n\n```bash\n./install.sh --target claude\n```\n\n## Manual Install\n\nCopy the [`matlab-plot-skill`](./matlab-plot-skill) folder into one or both of these locations:\n\n- Codex: `~/.agents/skills/matlab-plot-skill` (Codex releases before 2026 used `~/.codex/skills`)\n- Claude Code: `~/.claude/skills/matlab-plot-skill`\n\n## Example Invocation\n\nUse prompts like:\n\n```text\nUse $matlab-plot-skill to refactor Plots/generate_my_figure.m into a publication-quality PDF figure. Read the exported figure and the compiled paper page, then iterate until the spacing and titles are clean.\n```\n\n```text\nUse $matlab-plot-skill to improve this MATLAB appendix figure. Keep the color mapping fixed across panels, distinguish variants with markers, export a vector PDF, and read the generated figure yourself before stopping.\n```\n\n## Demo Example\n\nRun this from the repository root (the path is relative to MATLAB's working directory):\n\n```bash\nmatlab -batch \"run('examples/demo_publication_figure.m')\"\n```\n\nThis generates:\n\n- `examples/output/demo_publication_figure.pdf`\n- `examples/output/demo_publication_figure.png`\n\nThe PNG is there for fast review. The PDF is the publication-style export for the paper workflow. Only the PNG (used as the preview above) is committed; the vector PDF is git-ignored and produced locally when you run the demo.\n\n## Validation\n\n`tools/validate_repo.py` is an optional local check (it is not run by CI). Run it before contributing:\n\n```bash\nuv run --with pyyaml python tools/validate_repo.py .\n```\n\n(Or `pip install -r requirements-dev.txt` first, then `python tools/validate_repo.py .`.)\n\nThis checks:\n\n- required skill packaging files, including the committed demo PNG\n- `SKILL.md` front matter and that the body still expresses the render-review-iterate workflow\n- the export helper still uses `exportgraphics` vector output, and the demo still calls that helper\n- relative markdown links resolve\n- `openai.yaml` skill metadata\n- PowerShell install flow (when PowerShell is available)\n- bash install flow (when bash is available)\n\n## Making Changes\n\n1. If you change the MATLAB code, lint it locally: `matlab -batch \"checkcode('matlab-plot-skill/scripts/export_publication_figure.m')\"` (and the demo).\n2. If you change the demo, re-run it with MATLAB and re-commit `examples/output/demo_publication_figure.png` (the committed preview image).\n3. Run the validator above before committing.\n\n## Notes\n\n- Codex reads [`agents/openai.yaml`](./matlab-plot-skill/agents/openai.yaml) for optional UI metadata.\n- Claude Code can use the same `SKILL.md`-based folder structure.\n- The installer copies the skill, so re-run it with `--force` (`-Force` on PowerShell) after you update the repo to refresh the installed copy.\n- Restart your Claude Code or Codex session after installing so the new skill is picked up.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanlulong%2Fmatlab-plot-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanlulong%2Fmatlab-plot-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanlulong%2Fmatlab-plot-skill/lists"}