gsplot 0.2.0__tar.gz → 0.4.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.
Files changed (129) hide show
  1. gsplot-0.4.0/PKG-INFO +140 -0
  2. gsplot-0.4.0/README.md +115 -0
  3. gsplot-0.4.0/pyproject.toml +65 -0
  4. gsplot-0.4.0/src/gsplot/__init__.py +213 -0
  5. gsplot-0.4.0/src/gsplot/__init__.pyi +186 -0
  6. gsplot-0.4.0/src/gsplot/_compat/__init__.py +1 -0
  7. gsplot-0.4.0/src/gsplot/_compat/config.py +225 -0
  8. gsplot-0.4.0/src/gsplot/_compat/legacy/__init__.py +1 -0
  9. gsplot-0.4.0/src/gsplot/_compat/legacy/base/__init__.py +1 -0
  10. gsplot-0.4.0/src/gsplot/_compat/legacy/color/__init__.py +1 -0
  11. gsplot-0.4.0/src/gsplot/_compat/legacy/config/__init__.py +1 -0
  12. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/config/config.py +40 -29
  13. gsplot-0.4.0/src/gsplot/_compat/legacy/data/__init__.py +1 -0
  14. gsplot-0.4.0/src/gsplot/_compat/legacy/figure/__init__.py +1 -0
  15. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/axes.py +2 -2
  16. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/axes_inset.py +1 -2
  17. gsplot-0.4.0/src/gsplot/_compat/legacy/hello_world/__init__.py +1 -0
  18. gsplot-0.4.0/src/gsplot/_compat/legacy/hello_world/hello_world.py +16 -0
  19. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/logger.py +10 -22
  20. gsplot-0.4.0/src/gsplot/_compat/legacy/path/__init__.py +1 -0
  21. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/path/path.py +7 -1
  22. gsplot-0.4.0/src/gsplot/_compat/legacy/plot/__init__.py +1 -0
  23. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/line.py +2 -2
  24. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/line_colormap_dashed.py +6 -3
  25. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/line_colormap_solid.py +4 -2
  26. gsplot-0.4.0/src/gsplot/_compat/legacy/style/__init__.py +1 -0
  27. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/label.py +9 -15
  28. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/legend.py +3 -3
  29. gsplot-0.4.0/src/gsplot/_compat/legacy_api.py +1112 -0
  30. gsplot-0.4.0/src/gsplot/_compat/root.py +217 -0
  31. gsplot-0.4.0/src/gsplot/_compat/root_api.py +951 -0
  32. gsplot-0.4.0/src/gsplot/_compat/root_legacy.py +39 -0
  33. gsplot-0.4.0/src/gsplot/_compat/shim.py +44 -0
  34. gsplot-0.4.0/src/gsplot/_config/__init__.py +17 -0
  35. gsplot-0.4.0/src/gsplot/_config/loader.py +70 -0
  36. gsplot-0.4.0/src/gsplot/_config/model.py +473 -0
  37. gsplot-0.4.0/src/gsplot/_config/schema.py +232 -0
  38. gsplot-0.4.0/src/gsplot/_core/__init__.py +102 -0
  39. gsplot-0.4.0/src/gsplot/_core/errors.py +128 -0
  40. gsplot-0.4.0/src/gsplot/_core/numerics.py +77 -0
  41. gsplot-0.4.0/src/gsplot/_core/options.py +231 -0
  42. gsplot-0.4.0/src/gsplot/_core/plans.py +178 -0
  43. gsplot-0.4.0/src/gsplot/_core/targets.py +112 -0
  44. gsplot-0.4.0/src/gsplot/_core/types.py +910 -0
  45. gsplot-0.4.0/src/gsplot/_core/validation.py +146 -0
  46. gsplot-0.4.0/src/gsplot/_figure/__init__.py +33 -0
  47. gsplot-0.4.0/src/gsplot/_figure/backend.py +55 -0
  48. gsplot-0.4.0/src/gsplot/_figure/inset.py +299 -0
  49. gsplot-0.4.0/src/gsplot/_figure/layout.py +977 -0
  50. gsplot-0.4.0/src/gsplot/_figure/output.py +722 -0
  51. gsplot-0.4.0/src/gsplot/_io/__init__.py +34 -0
  52. gsplot-0.4.0/src/gsplot/_io/arrays.py +291 -0
  53. gsplot-0.4.0/src/gsplot/_io/build.py +34 -0
  54. gsplot-0.4.0/src/gsplot/_io/metadata.py +158 -0
  55. gsplot-0.4.0/src/gsplot/_io/paths.py +27 -0
  56. gsplot-0.4.0/src/gsplot/_plot/__init__.py +47 -0
  57. gsplot-0.4.0/src/gsplot/_plot/basic.py +1109 -0
  58. gsplot-0.4.0/src/gsplot/_plot/colored.py +315 -0
  59. gsplot-0.4.0/src/gsplot/_plot/colormap.py +266 -0
  60. gsplot-0.4.0/src/gsplot/_plot/series.py +86 -0
  61. gsplot-0.4.0/src/gsplot/_style/__init__.py +77 -0
  62. gsplot-0.4.0/src/gsplot/_style/axes.py +793 -0
  63. gsplot-0.4.0/src/gsplot/_style/legends.py +661 -0
  64. gsplot-0.4.0/src/gsplot/_style/panels.py +373 -0
  65. gsplot-0.4.0/src/gsplot/_style/paper.py +154 -0
  66. gsplot-0.4.0/src/gsplot/_style/themes.py +133 -0
  67. gsplot-0.4.0/src/gsplot/base/__init__.py +14 -0
  68. gsplot-0.4.0/src/gsplot/base/base.py +14 -0
  69. gsplot-0.4.0/src/gsplot/base/base_alias_validator.py +16 -0
  70. gsplot-0.4.0/src/gsplot/color/__init__.py +14 -0
  71. gsplot-0.4.0/src/gsplot/color/colormap.py +14 -0
  72. gsplot-0.4.0/src/gsplot/config/__init__.py +14 -0
  73. gsplot-0.4.0/src/gsplot/config/config.py +14 -0
  74. gsplot-0.4.0/src/gsplot/data/__init__.py +14 -0
  75. gsplot-0.4.0/src/gsplot/data/load_file.py +14 -0
  76. gsplot-0.4.0/src/gsplot/figure/__init__.py +14 -0
  77. gsplot-0.4.0/src/gsplot/figure/axes.py +14 -0
  78. gsplot-0.4.0/src/gsplot/figure/axes_base.py +14 -0
  79. gsplot-0.4.0/src/gsplot/figure/axes_inset.py +14 -0
  80. gsplot-0.4.0/src/gsplot/figure/axes_range_base.py +14 -0
  81. gsplot-0.4.0/src/gsplot/figure/figure_tools.py +14 -0
  82. gsplot-0.4.0/src/gsplot/figure/show.py +14 -0
  83. gsplot-0.4.0/src/gsplot/figure/store.py +14 -0
  84. gsplot-0.4.0/src/gsplot/hello_world/__init__.py +14 -0
  85. gsplot-0.4.0/src/gsplot/hello_world/hello_world.py +14 -0
  86. gsplot-0.4.0/src/gsplot/logger.py +14 -0
  87. gsplot-0.4.0/src/gsplot/path/__init__.py +14 -0
  88. gsplot-0.4.0/src/gsplot/path/path.py +14 -0
  89. gsplot-0.4.0/src/gsplot/plot/__init__.py +14 -0
  90. gsplot-0.4.0/src/gsplot/plot/line.py +14 -0
  91. gsplot-0.4.0/src/gsplot/plot/line_base.py +14 -0
  92. gsplot-0.4.0/src/gsplot/plot/line_colormap_base.py +14 -0
  93. gsplot-0.4.0/src/gsplot/plot/line_colormap_dashed.py +16 -0
  94. gsplot-0.4.0/src/gsplot/plot/line_colormap_solid.py +16 -0
  95. gsplot-0.4.0/src/gsplot/plot/scatter.py +14 -0
  96. gsplot-0.4.0/src/gsplot/plot/scatter_colormap.py +14 -0
  97. gsplot-0.4.0/src/gsplot/py.typed +1 -0
  98. gsplot-0.4.0/src/gsplot/style/__init__.py +14 -0
  99. gsplot-0.4.0/src/gsplot/style/graph.py +14 -0
  100. gsplot-0.4.0/src/gsplot/style/label.py +14 -0
  101. gsplot-0.4.0/src/gsplot/style/legend.py +14 -0
  102. gsplot-0.4.0/src/gsplot/style/legend_colormap.py +14 -0
  103. gsplot-0.4.0/src/gsplot/style/ticks.py +14 -0
  104. gsplot-0.4.0/src/gsplot/style/title.py +14 -0
  105. gsplot-0.4.0/src/gsplot/version.py +25 -0
  106. gsplot-0.2.0/PKG-INFO +0 -83
  107. gsplot-0.2.0/README.md +0 -62
  108. gsplot-0.2.0/gsplot/__init__.py +0 -109
  109. gsplot-0.2.0/gsplot/hello_world/hello_world.py +0 -23
  110. gsplot-0.2.0/gsplot/version.py +0 -2
  111. gsplot-0.2.0/pyproject.toml +0 -49
  112. {gsplot-0.2.0 → gsplot-0.4.0}/LICENSE +0 -0
  113. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/base/base.py +0 -0
  114. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/base/base_alias_validator.py +0 -0
  115. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/color/colormap.py +0 -0
  116. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/data/load_file.py +0 -0
  117. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/axes_base.py +0 -0
  118. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/axes_range_base.py +0 -0
  119. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/figure_tools.py +0 -0
  120. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/show.py +0 -0
  121. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/figure/store.py +0 -0
  122. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/line_base.py +0 -0
  123. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/line_colormap_base.py +0 -0
  124. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/scatter.py +0 -0
  125. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/plot/scatter_colormap.py +0 -0
  126. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/graph.py +0 -0
  127. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/legend_colormap.py +0 -0
  128. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/ticks.py +0 -0
  129. {gsplot-0.2.0/gsplot → gsplot-0.4.0/src/gsplot/_compat/legacy}/style/title.py +0 -0
gsplot-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: gsplot
3
+ Version: 0.4.0
4
+ Summary: Concise publication-quality scientific plotting built on Matplotlib
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: matplotlib,plotting,publication,scientific
8
+ Author: Giordano Mattoni
9
+ Maintainer: Soichiro Yamane
10
+ Requires-Python: >=3.10
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Dist: matplotlib (>=3.9.0)
18
+ Requires-Dist: numpy (>=1.26.4)
19
+ Project-URL: Documentation, https://soichiroyamane.github.io/gsplot/stable/
20
+ Project-URL: Homepage, https://soichiroyamane.github.io/gsplot/
21
+ Project-URL: Issues, https://github.com/SoichiroYamane/gsplot/issues
22
+ Project-URL: Repository, https://github.com/SoichiroYamane/gsplot
23
+ Description-Content-Type: text/markdown
24
+
25
+ <div align="center">
26
+ <img src="https://raw.githubusercontent.com/SoichiroYamane/gsplot/main/docs/_static/logo/logo_title_gsplot.png" alt="gsplot logo" width="300">
27
+ </div>
28
+
29
+ [![Documentation](https://github.com/SoichiroYamane/gsplot/actions/workflows/gh-pages-sphinx.yml/badge.svg)](https://soichiroyamane.github.io/gsplot/stable/)
30
+ [![PyPI](https://img.shields.io/pypi/v/gsplot)](https://pypi.org/project/gsplot/)
31
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
32
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://github.com/SoichiroYamane/gsplot/blob/main/LICENSE)
33
+
34
+ # gsplot
35
+
36
+ `gsplot` creates publication-quality scientific figures with a concise API on
37
+ top of Matplotlib. It adds paper-aware layouts, deterministic plotting and
38
+ styling helpers, validated JSON defaults, and lightweight build metadata while
39
+ returning ordinary Matplotlib `Figure`, `Axes`, and Artist objects.
40
+
41
+ The package is still evolving. Check the [documentation](https://soichiroyamane.github.io/gsplot/stable/)
42
+ and the [issue tracker](https://github.com/SoichiroYamane/gsplot/issues) before
43
+ depending on behavior that is not covered by the public API.
44
+
45
+ ## Install
46
+
47
+ `gsplot` supports Python 3.10 and newer:
48
+
49
+ ```bash
50
+ python -m pip install gsplot
51
+ ```
52
+
53
+ ## Quick example
54
+
55
+ ```python
56
+ import gsplot as gs
57
+
58
+ fig, axes = gs.subplots("AB")
59
+ gs.line(axes["A"], [0, 1, 2], [0, 1, 4], label="quadratic")
60
+ gs.scatter(axes["B"], [0, 1, 2], [0, 1, 4], label="samples", s=15)
61
+ gs.label(axes, "x", "value", square=True, index="in")
62
+ gs.legend(axes)
63
+ gs.save(fig, "quickstart", show=False)
64
+ ```
65
+
66
+ This creates a two-panel Matplotlib figure, saves `quickstart.png` and
67
+ `quickstart.pdf`, and remains compatible with regular Matplotlib operations.
68
+
69
+ The canonical helpers always receive their Figure or Axes target explicitly.
70
+ `save` writes PNG and PDF transactionally at 600 DPI with a tight crop and
71
+ displays the Figure after successful writes by default; pass `show=False` for
72
+ batch or headless output. Use `crop=False` when output dimensions must match
73
+ the Figure design canvas exactly. The advanced `savefig` helper retains its
74
+ conservative output controls.
75
+
76
+ For a complete scientific example, see the
77
+ [publication example](https://soichiroyamane.github.io/gsplot/dev/guides/examples/publication.html).
78
+
79
+ ## Configuration
80
+
81
+ Configuration is optional and explicit. Load a schema-2 JSON file and pass the
82
+ immutable value to supported functions:
83
+
84
+ ```python
85
+ import gsplot as gs
86
+
87
+ config = gs.load_config("path/to/gsplot.json")
88
+ fig, axes = gs.subplots(config=config)
89
+ ```
90
+
91
+ When a value is specified more than once, the precedence is:
92
+
93
+ 1. an argument passed directly to the function;
94
+ 2. the supplied immutable `Config` value;
95
+ 3. the function's default value.
96
+
97
+ Canonical code never searches the working directory or home directory for a
98
+ configuration file. See the [configuration guide](https://soichiroyamane.github.io/gsplot/dev/guides/examples/configuration.html)
99
+ for the supported schema, precedence, and backend notes.
100
+
101
+ ## Development
102
+
103
+ The repository uses Poetry and targets Python 3.10 or newer. With a compatible
104
+ Python interpreter:
105
+
106
+ ```bash
107
+ python -m pip install "poetry==2.4.1"
108
+ poetry install
109
+ MPLBACKEND=Agg poetry run pytest -q
110
+ MPLBACKEND=Agg poetry run sphinx-build -W -b html docs docs/_build/html
111
+ ```
112
+
113
+ The scripts under `examples/` are executable documentation. Run one from its own
114
+ directory, for example:
115
+
116
+ ```bash
117
+ cd examples/layouts && python mosaic.py
118
+ ```
119
+
120
+ `examples/compatibility/legacy_v0.py` intentionally demonstrates the deprecated
121
+ 0.x surface. All other plotting examples use the canonical explicit-target API.
122
+
123
+ See [the developer setup guide](https://soichiroyamane.github.io/gsplot/stable/reference/contribution/developer_env.html)
124
+ for formatting, type checking, packaging, and Docker instructions.
125
+
126
+ For private vulnerability reports and the supported-version policy, see
127
+ [SECURITY.md](https://github.com/SoichiroYamane/gsplot/blob/main/SECURITY.md).
128
+
129
+ ## Authors and maintenance
130
+
131
+ This repository builds on the original code developed by Giordano Mattoni.
132
+
133
+ - Original author: Giordano Mattoni
134
+ - Maintainer: Soichiro Yamane
135
+
136
+ ## License
137
+
138
+ This project is distributed under the
139
+ [MIT License](https://github.com/SoichiroYamane/gsplot/blob/main/LICENSE).
140
+
gsplot-0.4.0/README.md ADDED
@@ -0,0 +1,115 @@
1
+ <div align="center">
2
+ <img src="https://raw.githubusercontent.com/SoichiroYamane/gsplot/main/docs/_static/logo/logo_title_gsplot.png" alt="gsplot logo" width="300">
3
+ </div>
4
+
5
+ [![Documentation](https://github.com/SoichiroYamane/gsplot/actions/workflows/gh-pages-sphinx.yml/badge.svg)](https://soichiroyamane.github.io/gsplot/stable/)
6
+ [![PyPI](https://img.shields.io/pypi/v/gsplot)](https://pypi.org/project/gsplot/)
7
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://github.com/SoichiroYamane/gsplot/blob/main/LICENSE)
9
+
10
+ # gsplot
11
+
12
+ `gsplot` creates publication-quality scientific figures with a concise API on
13
+ top of Matplotlib. It adds paper-aware layouts, deterministic plotting and
14
+ styling helpers, validated JSON defaults, and lightweight build metadata while
15
+ returning ordinary Matplotlib `Figure`, `Axes`, and Artist objects.
16
+
17
+ The package is still evolving. Check the [documentation](https://soichiroyamane.github.io/gsplot/stable/)
18
+ and the [issue tracker](https://github.com/SoichiroYamane/gsplot/issues) before
19
+ depending on behavior that is not covered by the public API.
20
+
21
+ ## Install
22
+
23
+ `gsplot` supports Python 3.10 and newer:
24
+
25
+ ```bash
26
+ python -m pip install gsplot
27
+ ```
28
+
29
+ ## Quick example
30
+
31
+ ```python
32
+ import gsplot as gs
33
+
34
+ fig, axes = gs.subplots("AB")
35
+ gs.line(axes["A"], [0, 1, 2], [0, 1, 4], label="quadratic")
36
+ gs.scatter(axes["B"], [0, 1, 2], [0, 1, 4], label="samples", s=15)
37
+ gs.label(axes, "x", "value", square=True, index="in")
38
+ gs.legend(axes)
39
+ gs.save(fig, "quickstart", show=False)
40
+ ```
41
+
42
+ This creates a two-panel Matplotlib figure, saves `quickstart.png` and
43
+ `quickstart.pdf`, and remains compatible with regular Matplotlib operations.
44
+
45
+ The canonical helpers always receive their Figure or Axes target explicitly.
46
+ `save` writes PNG and PDF transactionally at 600 DPI with a tight crop and
47
+ displays the Figure after successful writes by default; pass `show=False` for
48
+ batch or headless output. Use `crop=False` when output dimensions must match
49
+ the Figure design canvas exactly. The advanced `savefig` helper retains its
50
+ conservative output controls.
51
+
52
+ For a complete scientific example, see the
53
+ [publication example](https://soichiroyamane.github.io/gsplot/dev/guides/examples/publication.html).
54
+
55
+ ## Configuration
56
+
57
+ Configuration is optional and explicit. Load a schema-2 JSON file and pass the
58
+ immutable value to supported functions:
59
+
60
+ ```python
61
+ import gsplot as gs
62
+
63
+ config = gs.load_config("path/to/gsplot.json")
64
+ fig, axes = gs.subplots(config=config)
65
+ ```
66
+
67
+ When a value is specified more than once, the precedence is:
68
+
69
+ 1. an argument passed directly to the function;
70
+ 2. the supplied immutable `Config` value;
71
+ 3. the function's default value.
72
+
73
+ Canonical code never searches the working directory or home directory for a
74
+ configuration file. See the [configuration guide](https://soichiroyamane.github.io/gsplot/dev/guides/examples/configuration.html)
75
+ for the supported schema, precedence, and backend notes.
76
+
77
+ ## Development
78
+
79
+ The repository uses Poetry and targets Python 3.10 or newer. With a compatible
80
+ Python interpreter:
81
+
82
+ ```bash
83
+ python -m pip install "poetry==2.4.1"
84
+ poetry install
85
+ MPLBACKEND=Agg poetry run pytest -q
86
+ MPLBACKEND=Agg poetry run sphinx-build -W -b html docs docs/_build/html
87
+ ```
88
+
89
+ The scripts under `examples/` are executable documentation. Run one from its own
90
+ directory, for example:
91
+
92
+ ```bash
93
+ cd examples/layouts && python mosaic.py
94
+ ```
95
+
96
+ `examples/compatibility/legacy_v0.py` intentionally demonstrates the deprecated
97
+ 0.x surface. All other plotting examples use the canonical explicit-target API.
98
+
99
+ See [the developer setup guide](https://soichiroyamane.github.io/gsplot/stable/reference/contribution/developer_env.html)
100
+ for formatting, type checking, packaging, and Docker instructions.
101
+
102
+ For private vulnerability reports and the supported-version policy, see
103
+ [SECURITY.md](https://github.com/SoichiroYamane/gsplot/blob/main/SECURITY.md).
104
+
105
+ ## Authors and maintenance
106
+
107
+ This repository builds on the original code developed by Giordano Mattoni.
108
+
109
+ - Original author: Giordano Mattoni
110
+ - Maintainer: Soichiro Yamane
111
+
112
+ ## License
113
+
114
+ This project is distributed under the
115
+ [MIT License](https://github.com/SoichiroYamane/gsplot/blob/main/LICENSE).
@@ -0,0 +1,65 @@
1
+ [project]
2
+ name = "gsplot"
3
+ version = "0.4.0"
4
+ description = "Concise publication-quality scientific plotting built on Matplotlib"
5
+ authors = [
6
+ { name = "Giordano Mattoni" },
7
+ ]
8
+ maintainers = [{ name = "Soichiro Yamane" }]
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ keywords = ["matplotlib", "plotting", "publication", "scientific"]
14
+ dependencies = [
15
+ "matplotlib>=3.9.0",
16
+ "numpy>=1.26.4",
17
+ ]
18
+
19
+ [project.urls]
20
+ Homepage = "https://soichiroyamane.github.io/gsplot/"
21
+ Documentation = "https://soichiroyamane.github.io/gsplot/stable/"
22
+ Repository = "https://github.com/SoichiroYamane/gsplot"
23
+ Issues = "https://github.com/SoichiroYamane/gsplot/issues"
24
+
25
+ [tool.poetry]
26
+ packages = [{ include = "gsplot", from = "src" }]
27
+
28
+ [tool.poetry.group.dev.dependencies]
29
+ flake8 = "^7.0.0"
30
+ black = ">=26.3.1,<27.0.0"
31
+ isort = ">=5.13.2,<9.0.0"
32
+ pre-commit = "^4.6.1"
33
+ furo = "^2025.12.19"
34
+ myst-parser = "^4.0.0"
35
+ pytest-watch = "^4.2.0"
36
+ pytest = ">=9.0.3,<10.0.0"
37
+ pytest-cov = ">=6.0,<8.0"
38
+ certifi = ">=2025.1.31,<2026.0.0"
39
+ pyright = "^1.1.390"
40
+ mypy = "^2.3.0"
41
+ pip-audit = { version = ">=2.10.1,<3.0.0", python = ">=3.10,<4.0" }
42
+ sphinxext-opengraph = "^0.13.0"
43
+ sphinx-pyscript = "^0.1.0"
44
+ sphinx-tippy = "^0.4.3"
45
+ sphinx-togglebutton = "^0.4.5"
46
+ sphinx-design = "^0.6.1"
47
+ sphinxcontrib-mermaid = "^2.1.0"
48
+ pydata-sphinx-theme = "^0.19.0"
49
+ sphinx-copybutton = "^0.5.2"
50
+ sphinx-autobuild = "^2024.10.3"
51
+ ipython = ">=8.20.0"
52
+
53
+
54
+ [build-system]
55
+ requires = ["poetry-core"]
56
+ build-backend = "poetry.core.masonry.api"
57
+
58
+ [tool.black]
59
+
60
+ [tool.isort]
61
+ profile = "black"
62
+
63
+ [tool.pytest.ini_options]
64
+ testpaths = ["tests"]
65
+ pythonpath = ["."]
@@ -0,0 +1,213 @@
1
+ """Lazy public package boundary for the canonical gsplot API.
2
+
3
+ The 0.3.x names remain available through deprecated compatibility adapters.
4
+ Importing the package itself intentionally performs no Matplotlib,
5
+ configuration, logging, metadata-file, or backend initialization.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import TYPE_CHECKING, Any
11
+
12
+ from ._compat.root import canonical_names as _canonical_names
13
+ from ._compat.root import legacy_names as _legacy_names
14
+ from ._compat.root import (
15
+ resolve_export,
16
+ )
17
+ from .version import __commit__, __version__
18
+
19
+ if TYPE_CHECKING:
20
+ # Runtime lookup stays lazy. Static analyzers see the canonical source
21
+ # objects instead of an ``Any``-typed dynamic facade, so the shipped
22
+ # ``py.typed`` marker provides useful signatures to downstream callers.
23
+ from ._compat.config import load_config
24
+ from ._config.model import Config
25
+ from ._core.errors import (
26
+ ConfigError,
27
+ DataError,
28
+ GsplotError,
29
+ LayoutError,
30
+ MetadataError,
31
+ OutputError,
32
+ PlotError,
33
+ )
34
+ from ._core.types import (
35
+ AxesDict,
36
+ AxesTarget,
37
+ AxisSpec,
38
+ BuildInfo,
39
+ ColorSpec,
40
+ InsetSpec,
41
+ LabelRecord,
42
+ LabelRecords,
43
+ LayoutMode,
44
+ LegendEntries,
45
+ Limit,
46
+ LineStyle,
47
+ Marker,
48
+ MetadataSnapshot,
49
+ MosaicSpec,
50
+ NormalizeSpec,
51
+ PerTarget,
52
+ Scale,
53
+ SizePreset,
54
+ SizeSpec,
55
+ StyleMode,
56
+ Theme,
57
+ TickSpec,
58
+ Unit,
59
+ ZoomCorners,
60
+ )
61
+ from ._figure.backend import use_backend
62
+ from ._figure.inset import inset, inset_axes
63
+ from ._figure.layout import subplots
64
+ from ._figure.output import save, savefig, show
65
+ from ._io.arrays import read, read_array
66
+ from ._io.build import build_info
67
+ from ._io.metadata import write_meta
68
+ from ._plot.basic import line, scatter
69
+ from ._plot.colored import cmap_dash, cmap_line, cmap_scatter
70
+ from ._plot.colormap import colors, sample_cmap
71
+ from ._style.axes import (
72
+ box_aspect,
73
+ label,
74
+ minor_ticks,
75
+ square,
76
+ style_axes,
77
+ suptitle,
78
+ title,
79
+ )
80
+ from ._style.legends import cmap_legend, legend, legend_entries, legends
81
+ from ._style.panels import index, panel_labels
82
+ from ._style.paper import paper
83
+ from ._style.themes import fig_facecolor, set_theme
84
+
85
+ # These are intentionally outside the canonical manifest but remain
86
+ # discoverable for the documented compatibility window.
87
+ get_cmap: Any
88
+ load_file: Any
89
+ load_file_fast: Any
90
+ axes: Any
91
+ axes_inset: Any
92
+ axes_inset_padding: Any
93
+ get_figure_size: Any
94
+ hello_world: Any
95
+ config_load: Any
96
+ config_dict: Any
97
+ config_entry_option: Any
98
+ home: Any
99
+ pwd: Any
100
+ pwd_move: Any
101
+ pwd_main: Any
102
+ line_colormap_solid: Any
103
+ line_colormap_dashed: Any
104
+ scatter_colormap: Any
105
+ graph_square: Any
106
+ graph_square_axes: Any
107
+ graph_white: Any
108
+ graph_white_axes: Any
109
+ graph_transparent: Any
110
+ graph_transparent_axes: Any
111
+ graph_facecolor: Any
112
+ label_add_index: Any
113
+ legend_axes: Any
114
+ legend_handlers: Any
115
+ legend_reverse: Any
116
+ legend_get_handlers: Any
117
+ legend_colormap: Any
118
+ ticks_off: Any
119
+ ticks_on: Any
120
+ ticks_on_axes: Any
121
+ title_axes: Any
122
+ logger: Any
123
+ save_metadata: Any
124
+
125
+ __all__ = [
126
+ "subplots",
127
+ "inset",
128
+ "inset_axes",
129
+ "line",
130
+ "scatter",
131
+ "cmap_line",
132
+ "cmap_dash",
133
+ "cmap_scatter",
134
+ "colors",
135
+ "sample_cmap",
136
+ "style_axes",
137
+ "label",
138
+ "square",
139
+ "title",
140
+ "suptitle",
141
+ "minor_ticks",
142
+ "box_aspect",
143
+ "panel_labels",
144
+ "index",
145
+ "fig_facecolor",
146
+ "legend",
147
+ "legends",
148
+ "legend_entries",
149
+ "cmap_legend",
150
+ "set_theme",
151
+ "paper",
152
+ "save",
153
+ "savefig",
154
+ "show",
155
+ "load_config",
156
+ "read",
157
+ "read_array",
158
+ "write_meta",
159
+ "build_info",
160
+ "use_backend",
161
+ "Config",
162
+ "AxisSpec",
163
+ "Theme",
164
+ "InsetSpec",
165
+ "MetadataSnapshot",
166
+ "BuildInfo",
167
+ "LegendEntries",
168
+ "GsplotError",
169
+ "ConfigError",
170
+ "DataError",
171
+ "LayoutError",
172
+ "PlotError",
173
+ "OutputError",
174
+ "MetadataError",
175
+ "MosaicSpec",
176
+ "NormalizeSpec",
177
+ "ColorSpec",
178
+ "AxesDict",
179
+ "AxesTarget",
180
+ "PerTarget",
181
+ "LineStyle",
182
+ "Marker",
183
+ "Unit",
184
+ "SizePreset",
185
+ "SizeSpec",
186
+ "LayoutMode",
187
+ "StyleMode",
188
+ "ZoomCorners",
189
+ "Limit",
190
+ "Scale",
191
+ "TickSpec",
192
+ "LabelRecord",
193
+ "LabelRecords",
194
+ ]
195
+
196
+
197
+ def __getattr__(name: str) -> Any:
198
+ """Resolve a canonical or legacy root export only when requested."""
199
+
200
+ value = resolve_export(name)
201
+ globals()[name] = value
202
+ return value
203
+
204
+
205
+ def __dir__() -> list[str]:
206
+ """Include lazy compatibility names in interactive discovery."""
207
+
208
+ return sorted(
209
+ set(globals())
210
+ | set(_legacy_names())
211
+ | set(_canonical_names())
212
+ | {"__commit__", "__version__"}
213
+ )