plotstyle 0.1.0a2__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plotstyle-1.0.0/CHANGELOG.md +78 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/PKG-INFO +56 -8
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/README.md +48 -4
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/pyproject.toml +18 -2
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/_version.py +2 -2
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/preview/gallery.py +1 -1
- plotstyle-0.1.0a2/CHANGELOG.md +0 -40
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/.gitignore +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/LICENSE +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/_utils/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/_utils/io.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/_utils/warnings.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/cli/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/cli/main.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/_rendering.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/accessibility.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/data/okabe_ito.json +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/data/safe_grayscale.json +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/data/tol_bright.json +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/data/tol_muted.json +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/data/tol_vibrant.json +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/grayscale.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/color/palettes.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/core/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/core/export.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/core/figure.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/core/migrate.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/core/style.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/engine/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/engine/fonts.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/engine/latex.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/engine/rcparams.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/integrations/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/integrations/seaborn.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/preview/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/preview/print_size.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/py.typed +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/_templates.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/acs.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/cell.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/elsevier.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/ieee.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/nature.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/plos.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/prl.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/schema.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/science.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/springer.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/units.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/specs/wiley.toml +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/__init__.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/_base.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/colors.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/dimensions.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/export.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/lines.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/checks/typography.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/src/plotstyle/validation/report.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/conftest.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_cli/test_main.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_color/test_accessibility.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_color/test_grayscale.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_color/test_palettes.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_color/test_rendering.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_core/test_export.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_core/test_figure.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_core/test_migrate.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_core/test_style.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_engine/test_fonts.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_engine/test_latex.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_engine/test_rcparams.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_integrations/test_seaborn.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_preview/test_gallery.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_preview/test_print_size.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_specs/test_registry.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_specs/test_schema.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_specs/test_units.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_utils/test_io.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_utils/test_warnings.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_validation/test_checks.py +0 -0
- {plotstyle-0.1.0a2 → plotstyle-1.0.0}/tests/test_validation/test_report.py +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **plotstyle** will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [PEP 440](https://peps.python.org/pep-0440/) versioning.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
_Nothing yet._
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [1.0.0] - 2026-04-12
|
|
17
|
+
|
|
18
|
+
First stable release — production-ready for scientific publication workflows.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Stable release** — promoted from alpha (`0.1.0a2`) to stable (`1.0.0`); all public APIs are now considered stable and subject to semantic versioning guarantees.
|
|
23
|
+
- **PyPI classifiers** updated to `Development Status :: 5 - Production/Stable`.
|
|
24
|
+
- **Enhanced project metadata** — expanded keywords, classifiers, and project URLs in `pyproject.toml` for better PyPI discoverability.
|
|
25
|
+
- **README improvements** — added more badges (downloads, docs status, code style), expanded feature descriptions, and added star-history / citation section.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [0.1.0a2] - 2026-04-12
|
|
30
|
+
|
|
31
|
+
Second alpha — full documentation suite, comprehensive test coverage, and hardened validation.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **Full documentation suite** — Sphinx/MyST docs covering installation, quickstart, concepts, CLI reference, complete API reference for every public symbol, how-to guides (accessibility, export, migration, multi-panel, palettes, seaborn), FAQ, and a journal comparison index.
|
|
36
|
+
- **ReadTheDocs integration** — `.readthedocs.yaml` added; docs build automatically on every push; Furo theme configured with custom CSS.
|
|
37
|
+
- **Comprehensive test suite** — new test modules added: `test_style`, `test_palettes`, `test_accessibility`, `test_grayscale`, `test_rendering`, `test_gallery`, `test_print_size`, `test_cli`, `test_io`, `test_warnings`, `test_checks`, `test_report`; existing modules `test_figure`, `test_export`, `test_migrate`, `test_fonts`, and `test_registry` substantially expanded.
|
|
38
|
+
- **Export DPI validation** — `validation/checks/export.py` now emits a hard `FAIL` (instead of a `WARN`) when `savefig.dpi` is a numeric value that is provably below the journal's minimum DPI requirement.
|
|
39
|
+
- **Dependabot** — `.github/dependabot.yml` added for automated dependency-update pull requests.
|
|
40
|
+
- **`_format_panel_label()` range guard** — raises `ValueError` for panel indices ≥ 702 (beyond the two-character `"zz"` label); valid range is now explicitly documented as 0–701.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- CI workflow extended: a `docs` build job added to `.github/workflows/ci.yml` — runs `sphinx-build -W -n` on every push and uploads the rendered HTML as an artifact.
|
|
45
|
+
- Module docstring quick-start example in `__init__.py` updated to use the context-manager form (`with plotstyle.use(...) as style:`) and `plotstyle.figure()` instead of `plotstyle.subplots()`.
|
|
46
|
+
- Docstrings across `migrate.py`, `report.py`, `style.py`, `figure.py`, `export.py`, and `accessibility.py` converted to NumPy-style attribute sections for consistent Sphinx rendering.
|
|
47
|
+
- `FORMAT_EXTENSIONS` constant in `export.py` annotated as a module-level Sphinx data comment (`#:`) so it appears correctly in the API docs.
|
|
48
|
+
- `pyproject.toml` documentation extras updated: `furo` pinned to `>=2025.12.19` and `myst-parser` bumped to `>=5.0,<6`.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## [0.1.0a1] - 2026-04-07
|
|
53
|
+
|
|
54
|
+
First public alpha release.
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- **Core style engine** — `plotstyle.use()` applies journal presets to Matplotlib's `rcParams`; works as a context manager with automatic restoration on exit.
|
|
59
|
+
- **Figure helpers** — `plotstyle.figure()` and `plotstyle.subplots()` create correctly-sized figures at the exact column width and max height specified by each journal.
|
|
60
|
+
- **Auto panel labels** — multi-panel figures receive **(a)**, **(b)**, **(c)**, … labels placed according to the journal's style rules.
|
|
61
|
+
- **Colorblind-safe palettes** — built-in Okabe–Ito, Tol Bright, Tol Vibrant, Tol Muted, and Safe Grayscale palettes (`plotstyle.palette()`).
|
|
62
|
+
- **Accessibility previews** — `plotstyle.preview_colorblind()` simulates deuteranopia, protanopia, and tritanopia; `plotstyle.preview_grayscale()` previews grayscale rendering.
|
|
63
|
+
- **Pre-submission validation** — `plotstyle.validate()` checks dimensions, typography, line weights, color accessibility, and export settings against a target journal spec.
|
|
64
|
+
- **Submission-ready export** — `plotstyle.savefig()` saves with font embedding and DPI enforcement; `plotstyle.export_submission()` batch-exports to all formats a journal accepts.
|
|
65
|
+
- **Spec diffing & migration** — `plotstyle.diff()` compares two journal specs; `plotstyle.migrate()` re-targets a figure from one journal to another.
|
|
66
|
+
- **Seaborn integration** — `patch_seaborn()` / `plotstyle_theme()` ensure PlotStyle `rcParams` survive `sns.set_theme()` calls.
|
|
67
|
+
- **Gallery & print-size preview** — `plotstyle.gallery()` generates sample figures; `plotstyle.preview_print_size()` opens an interactive scaled preview window.
|
|
68
|
+
- **Journal spec registry** — programmatic access via `plotstyle.registry`; specs are TOML files validated by immutable, typed dataclasses.
|
|
69
|
+
- **CLI** — `plotstyle list`, `plotstyle info`, `plotstyle diff`, `plotstyle fonts`, `plotstyle validate`, and `plotstyle export` sub-commands.
|
|
70
|
+
- **10 journal presets** — ACS, Cell, Elsevier, IEEE, Nature, PLOS, PRL, Science, Springer, Wiley.
|
|
71
|
+
- **10 working examples** — quick start, multi-panel, palettes, accessibility, validation, export, diff/migrate, gallery, registry, context manager patterns.
|
|
72
|
+
- **Dynamic versioning** — version derived from git tags via `hatch-vcs` and `importlib.metadata`.
|
|
73
|
+
- **CI/CD pipeline** — GitHub Actions workflows for lint, type-check, test matrix, and automated PyPI release via OIDC Trusted Publishing.
|
|
74
|
+
|
|
75
|
+
[Unreleased]: https://github.com/rahulkaushal04/plotstyle/compare/v1.0.0...HEAD
|
|
76
|
+
[1.0.0]: https://github.com/rahulkaushal04/plotstyle/compare/v0.1.0a2...v1.0.0
|
|
77
|
+
[0.1.0a2]: https://github.com/rahulkaushal04/plotstyle/compare/v0.1.0a1...v0.1.0a2
|
|
78
|
+
[0.1.0a1]: https://github.com/rahulkaushal04/plotstyle/releases/tag/v0.1.0a1
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotstyle
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Matplotlib/seaborn style presets matching scientific journal requirements, with validation, export safety, and preview capabilities.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rahulkaushal04/plotstyle
|
|
6
6
|
Project-URL: Documentation, https://plotstyle.readthedocs.io
|
|
7
7
|
Project-URL: Repository, https://github.com/rahulkaushal04/plotstyle
|
|
8
8
|
Project-URL: Issues, https://github.com/rahulkaushal04/plotstyle/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/rahulkaushal04/plotstyle/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Download, https://pypi.org/project/plotstyle/
|
|
10
11
|
Author: Rahul Kaushal
|
|
11
12
|
License: MIT
|
|
12
13
|
License-File: LICENSE
|
|
13
|
-
Keywords: figures,journal,matplotlib,plotting,publication,scientific,seaborn,style
|
|
14
|
-
Classifier: Development Status ::
|
|
14
|
+
Keywords: academic,accessibility,colorblind,export,figures,ieee,journal,matplotlib,nature,plotting,publication,rcParams,research,science,scientific,seaborn,style,typesetting,validation,visualization
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: Framework :: Matplotlib
|
|
17
|
+
Classifier: Intended Audience :: Education
|
|
15
18
|
Classifier: Intended Audience :: Science/Research
|
|
16
19
|
Classifier: License :: OSI Approved :: MIT License
|
|
17
20
|
Classifier: Natural Language :: English
|
|
@@ -22,6 +25,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
22
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
26
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
27
|
Classifier: Topic :: Multimedia :: Graphics
|
|
28
|
+
Classifier: Topic :: Scientific/Engineering
|
|
25
29
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
26
30
|
Classifier: Typing :: Typed
|
|
27
31
|
Requires-Python: >=3.10
|
|
@@ -38,7 +42,7 @@ Provides-Extra: dev
|
|
|
38
42
|
Requires-Dist: mypy<2,>=1.15; extra == 'dev'
|
|
39
43
|
Requires-Dist: pillow<13,>=11.0; extra == 'dev'
|
|
40
44
|
Requires-Dist: pre-commit<5,>=4.0; extra == 'dev'
|
|
41
|
-
Requires-Dist: pytest-cov<
|
|
45
|
+
Requires-Dist: pytest-cov<8,>=6.0; extra == 'dev'
|
|
42
46
|
Requires-Dist: pytest-mpl<1,>=0.18; extra == 'dev'
|
|
43
47
|
Requires-Dist: pytest<10,>=8.3; extra == 'dev'
|
|
44
48
|
Requires-Dist: ruff<1,>=0.15; extra == 'dev'
|
|
@@ -64,10 +68,14 @@ Description-Content-Type: text/markdown
|
|
|
64
68
|
</p>
|
|
65
69
|
|
|
66
70
|
<p align="center">
|
|
67
|
-
<a href="https://pypi.org/project/plotstyle/"><img alt="PyPI" src="https://img.shields.io/pypi/v/plotstyle?color=blue"></a>
|
|
68
|
-
<a href="https://pypi.org/project/plotstyle/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/plotstyle"></a>
|
|
69
|
-
<a href="https://
|
|
71
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/plotstyle?color=blue"></a>
|
|
72
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/plotstyle"></a>
|
|
73
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/plotstyle?color=green"></a>
|
|
74
|
+
<a href="https://github.com/rahulkaushal04/plotstyle/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/rahulkaushal04/plotstyle"></a>
|
|
70
75
|
<a href="https://github.com/rahulkaushal04/plotstyle/actions"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/rahulkaushal04/plotstyle/ci.yml?label=CI"></a>
|
|
76
|
+
<a href="https://plotstyle.readthedocs.io"><img alt="Docs" src="https://img.shields.io/readthedocs/plotstyle?label=docs"></a>
|
|
77
|
+
<a href="https://github.com/rahulkaushal04/plotstyle"><img alt="Code style: Ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
|
|
78
|
+
<a href="https://github.com/rahulkaushal04/plotstyle"><img alt="Typed: mypy" src="https://img.shields.io/badge/typed-mypy-blue"></a>
|
|
71
79
|
</p>
|
|
72
80
|
|
|
73
81
|
---
|
|
@@ -76,12 +84,13 @@ Description-Content-Type: text/markdown
|
|
|
76
84
|
|
|
77
85
|
Getting a figure accepted often means matching a journal's precise column width, font size range, line weight, DPI, and export format. PlotStyle encodes those requirements as TOML specs and applies them automatically, so you spend time on your science rather than your figure settings.
|
|
78
86
|
|
|
79
|
-
> **Current release:** `
|
|
87
|
+
> **Current release:** `v1.0.0` (stable)
|
|
80
88
|
|
|
81
89
|
---
|
|
82
90
|
|
|
83
91
|
## Table of Contents
|
|
84
92
|
|
|
93
|
+
- [Why PlotStyle?](#why-plotstyle)
|
|
85
94
|
- [Features](#features)
|
|
86
95
|
- [Supported Journals](#supported-journals)
|
|
87
96
|
- [Installation](#installation)
|
|
@@ -89,11 +98,21 @@ Getting a figure accepted often means matching a journal's precise column width,
|
|
|
89
98
|
- [Usage](#usage)
|
|
90
99
|
- [CLI](#cli)
|
|
91
100
|
- [Examples](#examples)
|
|
101
|
+
- [Documentation](#documentation)
|
|
92
102
|
- [Contributing](#contributing)
|
|
103
|
+
- [Citation](#citation)
|
|
93
104
|
- [License](#license)
|
|
94
105
|
|
|
95
106
|
---
|
|
96
107
|
|
|
108
|
+
## Why PlotStyle?
|
|
109
|
+
|
|
110
|
+
Most journals reject figures that don't meet their formatting requirements — wrong column width, incorrect font sizes, missing font embedding, insufficient DPI, or incompatible file formats. Fixing these manually is tedious and error-prone, especially when targeting multiple journals.
|
|
111
|
+
|
|
112
|
+
PlotStyle solves this by encoding each journal's exact requirements into machine-readable specs and applying them automatically. You focus on your data; PlotStyle handles the formatting.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
97
116
|
## Features
|
|
98
117
|
|
|
99
118
|
- **One-line journal presets** — `plotstyle.use("nature")` sets fonts, sizes, line widths, and export parameters in Matplotlib's `rcParams`. Wrap it in a `with` block and everything is restored automatically when the block exits.
|
|
@@ -336,12 +355,41 @@ Working examples are in the [`examples/`](examples/) directory:
|
|
|
336
355
|
|
|
337
356
|
---
|
|
338
357
|
|
|
358
|
+
## Documentation
|
|
359
|
+
|
|
360
|
+
Full documentation is available at **[plotstyle.readthedocs.io](https://plotstyle.readthedocs.io)**:
|
|
361
|
+
|
|
362
|
+
- [Installation guide](https://plotstyle.readthedocs.io/en/latest/installation.html)
|
|
363
|
+
- [Quick start tutorial](https://plotstyle.readthedocs.io/en/latest/quickstart.html)
|
|
364
|
+
- [API reference](https://plotstyle.readthedocs.io/en/latest/api/index.html)
|
|
365
|
+
- [How-to guides](https://plotstyle.readthedocs.io/en/latest/guides/index.html)
|
|
366
|
+
- [CLI reference](https://plotstyle.readthedocs.io/en/latest/cli.html)
|
|
367
|
+
- [FAQ](https://plotstyle.readthedocs.io/en/latest/faq.html)
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
339
371
|
## Contributing
|
|
340
372
|
|
|
341
373
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, adding journal specs, code style, and pull request guidelines.
|
|
342
374
|
|
|
343
375
|
---
|
|
344
376
|
|
|
377
|
+
## Citation
|
|
378
|
+
|
|
379
|
+
If PlotStyle helps your research, a citation or star is appreciated:
|
|
380
|
+
|
|
381
|
+
```bibtex
|
|
382
|
+
@software{plotstyle,
|
|
383
|
+
author = {Kaushal, Rahul},
|
|
384
|
+
title = {PlotStyle: Publication-ready scientific figure presets for Matplotlib},
|
|
385
|
+
year = {2026},
|
|
386
|
+
url = {https://github.com/rahulkaushal04/plotstyle},
|
|
387
|
+
license = {MIT},
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
345
393
|
## License
|
|
346
394
|
|
|
347
395
|
[MIT](LICENSE) © 2026 Rahul Kaushal
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://pypi.org/project/plotstyle/"><img alt="PyPI" src="https://img.shields.io/pypi/v/plotstyle?color=blue"></a>
|
|
11
|
-
<a href="https://pypi.org/project/plotstyle/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/plotstyle"></a>
|
|
12
|
-
<a href="https://
|
|
10
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/plotstyle?color=blue"></a>
|
|
11
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/plotstyle"></a>
|
|
12
|
+
<a href="https://pypi.org/project/plotstyle/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/plotstyle?color=green"></a>
|
|
13
|
+
<a href="https://github.com/rahulkaushal04/plotstyle/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/rahulkaushal04/plotstyle"></a>
|
|
13
14
|
<a href="https://github.com/rahulkaushal04/plotstyle/actions"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/rahulkaushal04/plotstyle/ci.yml?label=CI"></a>
|
|
15
|
+
<a href="https://plotstyle.readthedocs.io"><img alt="Docs" src="https://img.shields.io/readthedocs/plotstyle?label=docs"></a>
|
|
16
|
+
<a href="https://github.com/rahulkaushal04/plotstyle"><img alt="Code style: Ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
|
|
17
|
+
<a href="https://github.com/rahulkaushal04/plotstyle"><img alt="Typed: mypy" src="https://img.shields.io/badge/typed-mypy-blue"></a>
|
|
14
18
|
</p>
|
|
15
19
|
|
|
16
20
|
---
|
|
@@ -19,12 +23,13 @@
|
|
|
19
23
|
|
|
20
24
|
Getting a figure accepted often means matching a journal's precise column width, font size range, line weight, DPI, and export format. PlotStyle encodes those requirements as TOML specs and applies them automatically, so you spend time on your science rather than your figure settings.
|
|
21
25
|
|
|
22
|
-
> **Current release:** `
|
|
26
|
+
> **Current release:** `v1.0.0` (stable)
|
|
23
27
|
|
|
24
28
|
---
|
|
25
29
|
|
|
26
30
|
## Table of Contents
|
|
27
31
|
|
|
32
|
+
- [Why PlotStyle?](#why-plotstyle)
|
|
28
33
|
- [Features](#features)
|
|
29
34
|
- [Supported Journals](#supported-journals)
|
|
30
35
|
- [Installation](#installation)
|
|
@@ -32,11 +37,21 @@ Getting a figure accepted often means matching a journal's precise column width,
|
|
|
32
37
|
- [Usage](#usage)
|
|
33
38
|
- [CLI](#cli)
|
|
34
39
|
- [Examples](#examples)
|
|
40
|
+
- [Documentation](#documentation)
|
|
35
41
|
- [Contributing](#contributing)
|
|
42
|
+
- [Citation](#citation)
|
|
36
43
|
- [License](#license)
|
|
37
44
|
|
|
38
45
|
---
|
|
39
46
|
|
|
47
|
+
## Why PlotStyle?
|
|
48
|
+
|
|
49
|
+
Most journals reject figures that don't meet their formatting requirements — wrong column width, incorrect font sizes, missing font embedding, insufficient DPI, or incompatible file formats. Fixing these manually is tedious and error-prone, especially when targeting multiple journals.
|
|
50
|
+
|
|
51
|
+
PlotStyle solves this by encoding each journal's exact requirements into machine-readable specs and applying them automatically. You focus on your data; PlotStyle handles the formatting.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
40
55
|
## Features
|
|
41
56
|
|
|
42
57
|
- **One-line journal presets** — `plotstyle.use("nature")` sets fonts, sizes, line widths, and export parameters in Matplotlib's `rcParams`. Wrap it in a `with` block and everything is restored automatically when the block exits.
|
|
@@ -279,12 +294,41 @@ Working examples are in the [`examples/`](examples/) directory:
|
|
|
279
294
|
|
|
280
295
|
---
|
|
281
296
|
|
|
297
|
+
## Documentation
|
|
298
|
+
|
|
299
|
+
Full documentation is available at **[plotstyle.readthedocs.io](https://plotstyle.readthedocs.io)**:
|
|
300
|
+
|
|
301
|
+
- [Installation guide](https://plotstyle.readthedocs.io/en/latest/installation.html)
|
|
302
|
+
- [Quick start tutorial](https://plotstyle.readthedocs.io/en/latest/quickstart.html)
|
|
303
|
+
- [API reference](https://plotstyle.readthedocs.io/en/latest/api/index.html)
|
|
304
|
+
- [How-to guides](https://plotstyle.readthedocs.io/en/latest/guides/index.html)
|
|
305
|
+
- [CLI reference](https://plotstyle.readthedocs.io/en/latest/cli.html)
|
|
306
|
+
- [FAQ](https://plotstyle.readthedocs.io/en/latest/faq.html)
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
282
310
|
## Contributing
|
|
283
311
|
|
|
284
312
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, adding journal specs, code style, and pull request guidelines.
|
|
285
313
|
|
|
286
314
|
---
|
|
287
315
|
|
|
316
|
+
## Citation
|
|
317
|
+
|
|
318
|
+
If PlotStyle helps your research, a citation or star is appreciated:
|
|
319
|
+
|
|
320
|
+
```bibtex
|
|
321
|
+
@software{plotstyle,
|
|
322
|
+
author = {Kaushal, Rahul},
|
|
323
|
+
title = {PlotStyle: Publication-ready scientific figure presets for Matplotlib},
|
|
324
|
+
year = {2026},
|
|
325
|
+
url = {https://github.com/rahulkaushal04/plotstyle},
|
|
326
|
+
license = {MIT},
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
288
332
|
## License
|
|
289
333
|
|
|
290
334
|
[MIT](LICENSE) © 2026 Rahul Kaushal
|
|
@@ -31,10 +31,23 @@ keywords = [
|
|
|
31
31
|
"publication",
|
|
32
32
|
"figures",
|
|
33
33
|
"style",
|
|
34
|
+
"visualization",
|
|
35
|
+
"academic",
|
|
36
|
+
"research",
|
|
37
|
+
"typesetting",
|
|
38
|
+
"colorblind",
|
|
39
|
+
"accessibility",
|
|
40
|
+
"export",
|
|
41
|
+
"validation",
|
|
42
|
+
"rcParams",
|
|
43
|
+
"nature",
|
|
44
|
+
"ieee",
|
|
45
|
+
"science",
|
|
34
46
|
]
|
|
35
47
|
classifiers = [
|
|
36
|
-
"Development Status ::
|
|
48
|
+
"Development Status :: 5 - Production/Stable",
|
|
37
49
|
"Intended Audience :: Science/Research",
|
|
50
|
+
"Intended Audience :: Education",
|
|
38
51
|
"License :: OSI Approved :: MIT License",
|
|
39
52
|
"Natural Language :: English",
|
|
40
53
|
"Operating System :: OS Independent",
|
|
@@ -43,8 +56,10 @@ classifiers = [
|
|
|
43
56
|
"Programming Language :: Python :: 3.11",
|
|
44
57
|
"Programming Language :: Python :: 3.12",
|
|
45
58
|
"Programming Language :: Python :: 3.13",
|
|
59
|
+
"Topic :: Scientific/Engineering",
|
|
46
60
|
"Topic :: Scientific/Engineering :: Visualization",
|
|
47
61
|
"Topic :: Multimedia :: Graphics",
|
|
62
|
+
"Framework :: Matplotlib",
|
|
48
63
|
"Typing :: Typed",
|
|
49
64
|
]
|
|
50
65
|
|
|
@@ -80,7 +95,7 @@ seaborn = [
|
|
|
80
95
|
dev = [
|
|
81
96
|
"plotstyle[color]", # preview/export tests need Pillow
|
|
82
97
|
"pytest>=8.3,<10",
|
|
83
|
-
"pytest-cov>=6.0,<
|
|
98
|
+
"pytest-cov>=6.0,<8",
|
|
84
99
|
"pytest-mpl>=0.18,<1",
|
|
85
100
|
"ruff>=0.15,<1",
|
|
86
101
|
"mypy>=1.15,<2",
|
|
@@ -120,6 +135,7 @@ Documentation = "https://plotstyle.readthedocs.io"
|
|
|
120
135
|
Repository = "https://github.com/rahulkaushal04/plotstyle"
|
|
121
136
|
Issues = "https://github.com/rahulkaushal04/plotstyle/issues"
|
|
122
137
|
Changelog = "https://github.com/rahulkaushal04/plotstyle/blob/main/CHANGELOG.md"
|
|
138
|
+
Download = "https://pypi.org/project/plotstyle/"
|
|
123
139
|
|
|
124
140
|
|
|
125
141
|
# =============================================================================
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (
|
|
21
|
+
__version__ = version = '1.0.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 0, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -317,7 +317,7 @@ def gallery(journal: str, *, columns: int = 1) -> Figure:
|
|
|
317
317
|
# Dispatch each panel drawer to its corresponding axes in row-major
|
|
318
318
|
# order. axes.flat guarantees a consistent iteration order regardless
|
|
319
319
|
# of the nrows/ncols layout.
|
|
320
|
-
for draw_panel, ax in zip(_PANEL_DRAWERS, axes.flat, strict=
|
|
320
|
+
for draw_panel, ax in zip(_PANEL_DRAWERS, axes.flat, strict=True):
|
|
321
321
|
draw_panel(ax)
|
|
322
322
|
|
|
323
323
|
# Title is set one point above max_font_pt to serve as a visual
|
plotstyle-0.1.0a2/CHANGELOG.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to **plotstyle** will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [PEP 440](https://peps.python.org/pep-0440/) versioning.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## [Unreleased]
|
|
11
|
-
|
|
12
|
-
_Nothing yet._
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## [0.1.0a1] - 2026-04-07
|
|
17
|
-
|
|
18
|
-
First public alpha release.
|
|
19
|
-
|
|
20
|
-
### Added
|
|
21
|
-
|
|
22
|
-
- **Core style engine** — `plotstyle.use()` applies journal presets to Matplotlib's `rcParams`; works as a context manager with automatic restoration on exit.
|
|
23
|
-
- **Figure helpers** — `plotstyle.figure()` and `plotstyle.subplots()` create correctly-sized figures at the exact column width and max height specified by each journal.
|
|
24
|
-
- **Auto panel labels** — multi-panel figures receive **(a)**, **(b)**, **(c)**, … labels placed according to the journal's style rules.
|
|
25
|
-
- **Colorblind-safe palettes** — built-in Okabe–Ito, Tol Bright, Tol Vibrant, Tol Muted, and Safe Grayscale palettes (`plotstyle.palette()`).
|
|
26
|
-
- **Accessibility previews** — `plotstyle.preview_colorblind()` simulates deuteranopia, protanopia, and tritanopia; `plotstyle.preview_grayscale()` previews grayscale rendering.
|
|
27
|
-
- **Pre-submission validation** — `plotstyle.validate()` checks dimensions, typography, line weights, color accessibility, and export settings against a target journal spec.
|
|
28
|
-
- **Submission-ready export** — `plotstyle.savefig()` saves with font embedding and DPI enforcement; `plotstyle.export_submission()` batch-exports to all formats a journal accepts.
|
|
29
|
-
- **Spec diffing & migration** — `plotstyle.diff()` compares two journal specs; `plotstyle.migrate()` re-targets a figure from one journal to another.
|
|
30
|
-
- **Seaborn integration** — `patch_seaborn()` / `plotstyle_theme()` ensure PlotStyle `rcParams` survive `sns.set_theme()` calls.
|
|
31
|
-
- **Gallery & print-size preview** — `plotstyle.gallery()` generates sample figures; `plotstyle.preview_print_size()` opens an interactive scaled preview window.
|
|
32
|
-
- **Journal spec registry** — programmatic access via `plotstyle.registry`; specs are TOML files validated by immutable, typed dataclasses.
|
|
33
|
-
- **CLI** — `plotstyle list`, `plotstyle info`, `plotstyle diff`, `plotstyle fonts`, `plotstyle validate`, and `plotstyle export` sub-commands.
|
|
34
|
-
- **10 journal presets** — ACS, Cell, Elsevier, IEEE, Nature, PLOS, PRL, Science, Springer, Wiley.
|
|
35
|
-
- **10 working examples** — quick start, multi-panel, palettes, accessibility, validation, export, diff/migrate, gallery, registry, context manager patterns.
|
|
36
|
-
- **Dynamic versioning** — version derived from git tags via `hatch-vcs` and `importlib.metadata`.
|
|
37
|
-
- **CI/CD pipeline** — GitHub Actions workflows for lint, type-check, test matrix, and automated PyPI release via OIDC Trusted Publishing.
|
|
38
|
-
|
|
39
|
-
[Unreleased]: https://github.com/rahulkaushal04/plotstyle/compare/v0.1.0a1...HEAD
|
|
40
|
-
[0.1.0a1]: https://github.com/rahulkaushal04/plotstyle/releases/tag/v0.1.0a1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|