StonerPlots 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.
Files changed (65) hide show
  1. StonerPlots-1.0.0/.gitignore +173 -0
  2. StonerPlots-1.0.0/CHANGES.md +8 -0
  3. StonerPlots-1.0.0/LICENSE +25 -0
  4. StonerPlots-1.0.0/MANIFEST.in +1 -0
  5. StonerPlots-1.0.0/PKG-INFO +102 -0
  6. StonerPlots-1.0.0/README.md +87 -0
  7. StonerPlots-1.0.0/examples/figures/fig01a.png +0 -0
  8. StonerPlots-1.0.0/examples/figures/fig01b.png +0 -0
  9. StonerPlots-1.0.0/examples/figures/fig02a.png +0 -0
  10. StonerPlots-1.0.0/examples/figures/fig02b.png +0 -0
  11. StonerPlots-1.0.0/examples/figures/fig02c.pdf +0 -0
  12. StonerPlots-1.0.0/examples/figures/fig02c.png +0 -0
  13. StonerPlots-1.0.0/examples/figures/fig02d.png +0 -0
  14. StonerPlots-1.0.0/examples/figures/fig02e.png +0 -0
  15. StonerPlots-1.0.0/examples/figures/fig02f.png +0 -0
  16. StonerPlots-1.0.0/examples/figures/fig02g.png +0 -0
  17. StonerPlots-1.0.0/examples/figures/fig03.png +0 -0
  18. StonerPlots-1.0.0/examples/figures/fig04.png +0 -0
  19. StonerPlots-1.0.0/examples/figures/fig05.png +0 -0
  20. StonerPlots-1.0.0/examples/figures/fig06.png +0 -0
  21. StonerPlots-1.0.0/examples/figures/fig07.png +0 -0
  22. StonerPlots-1.0.0/examples/figures/fig08.png +0 -0
  23. StonerPlots-1.0.0/examples/figures/fig09.png +0 -0
  24. StonerPlots-1.0.0/examples/figures/fig10.png +0 -0
  25. StonerPlots-1.0.0/examples/figures/fig11.png +0 -0
  26. StonerPlots-1.0.0/examples/figures/fig12.png +0 -0
  27. StonerPlots-1.0.0/examples/figures/fig13.png +0 -0
  28. StonerPlots-1.0.0/examples/figures/fig14.png +0 -0
  29. StonerPlots-1.0.0/examples/figures/fig15.png +0 -0
  30. StonerPlots-1.0.0/examples/figures/fig16.png +0 -0
  31. StonerPlots-1.0.0/examples/matplotlibrc +798 -0
  32. StonerPlots-1.0.0/examples/plot-examples.py +221 -0
  33. StonerPlots-1.0.0/pyproject.toml +38 -0
  34. StonerPlots-1.0.0/setup.cfg +4 -0
  35. StonerPlots-1.0.0/setup.py +26 -0
  36. StonerPlots-1.0.0/src/StonerPlots.egg-info/PKG-INFO +102 -0
  37. StonerPlots-1.0.0/src/StonerPlots.egg-info/SOURCES.txt +63 -0
  38. StonerPlots-1.0.0/src/StonerPlots.egg-info/dependency_links.txt +1 -0
  39. StonerPlots-1.0.0/src/StonerPlots.egg-info/top_level.txt +1 -0
  40. StonerPlots-1.0.0/src/stonerplots/__init__.py +24 -0
  41. StonerPlots-1.0.0/src/stonerplots/context.py +196 -0
  42. StonerPlots-1.0.0/src/stonerplots/styles/color/bright.mplstyle +6 -0
  43. StonerPlots-1.0.0/src/stonerplots/styles/color/high-contrast.mplstyle +6 -0
  44. StonerPlots-1.0.0/src/stonerplots/styles/color/high-vis.mplstyle +4 -0
  45. StonerPlots-1.0.0/src/stonerplots/styles/color/light.mplstyle +6 -0
  46. StonerPlots-1.0.0/src/stonerplots/styles/color/muted.mplstyle +6 -0
  47. StonerPlots-1.0.0/src/stonerplots/styles/color/retro.mplstyle +4 -0
  48. StonerPlots-1.0.0/src/stonerplots/styles/color/std-colours.mplstyle +4 -0
  49. StonerPlots-1.0.0/src/stonerplots/styles/color/vibrant.mplstyle +6 -0
  50. StonerPlots-1.0.0/src/stonerplots/styles/journals/aps.mplstyle +35 -0
  51. StonerPlots-1.0.0/src/stonerplots/styles/journals/ieee.mplstyle +15 -0
  52. StonerPlots-1.0.0/src/stonerplots/styles/journals/nature.mplstyle +31 -0
  53. StonerPlots-1.0.0/src/stonerplots/styles/misc/grid.mplstyle +15 -0
  54. StonerPlots-1.0.0/src/stonerplots/styles/misc/latex-sans.mplstyle +11 -0
  55. StonerPlots-1.0.0/src/stonerplots/styles/misc/no-latex.mplstyle +10 -0
  56. StonerPlots-1.0.0/src/stonerplots/styles/misc/pgf.mplstyle +3 -0
  57. StonerPlots-1.0.0/src/stonerplots/styles/misc/sans.mplstyle +10 -0
  58. StonerPlots-1.0.0/src/stonerplots/styles/modifiers/aps1.5.mplstyle +6 -0
  59. StonerPlots-1.0.0/src/stonerplots/styles/modifiers/aps2.mplstyle +6 -0
  60. StonerPlots-1.0.0/src/stonerplots/styles/notebook.mplstyle +36 -0
  61. StonerPlots-1.0.0/src/stonerplots/styles/poster.mplstyle +45 -0
  62. StonerPlots-1.0.0/src/stonerplots/styles/presentation.mplstyle +37 -0
  63. StonerPlots-1.0.0/src/stonerplots/styles/presentation_sm.mplstyle +4 -0
  64. StonerPlots-1.0.0/src/stonerplots/styles/scatter.mplstyle +7 -0
  65. StonerPlots-1.0.0/src/stonerplots/styles/stoner.mplstyle +49 -0
@@ -0,0 +1,173 @@
1
+ .ipynb_checkpoints/
2
+ .DS_STORE
3
+ SciencePlots.egg-info/
4
+
5
+ dist/
6
+ dev/
7
+
8
+ TODO.md
9
+ new-version.md
10
+
11
+ # Byte-compiled / optimized / DLL files
12
+ __pycache__/
13
+ *.py[cod]
14
+ *$py.class
15
+
16
+ # C extensions
17
+ *.so
18
+
19
+ # Distribution / packaging
20
+ .Python
21
+ build/
22
+ develop-eggs/
23
+ dist/
24
+ downloads/
25
+ eggs/
26
+ .eggs/
27
+ lib/
28
+ lib64/
29
+ parts/
30
+ sdist/
31
+ var/
32
+ wheels/
33
+ share/python-wheels/
34
+ *.egg-info/
35
+ .installed.cfg
36
+ *.egg
37
+ MANIFEST
38
+
39
+ # PyInstaller
40
+ # Usually these files are written by a python script from a template
41
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
42
+ *.manifest
43
+ *.spec
44
+
45
+ # Installer logs
46
+ pip-log.txt
47
+ pip-delete-this-directory.txt
48
+
49
+ # Unit test / coverage reports
50
+ htmlcov/
51
+ .tox/
52
+ .nox/
53
+ .coverage
54
+ .coverage.*
55
+ .cache
56
+ nosetests.xml
57
+ coverage.xml
58
+ *.cover
59
+ *.py,cover
60
+ .hypothesis/
61
+ .pytest_cache/
62
+ cover/
63
+
64
+ # Translations
65
+ *.mo
66
+ *.pot
67
+
68
+ # Django stuff:
69
+ *.log
70
+ local_settings.py
71
+ db.sqlite3
72
+ db.sqlite3-journal
73
+
74
+ # Flask stuff:
75
+ instance/
76
+ .webassets-cache
77
+
78
+ # Scrapy stuff:
79
+ .scrapy
80
+
81
+ # Sphinx documentation
82
+ docs/_build/
83
+
84
+ # PyBuilder
85
+ .pybuilder/
86
+ target/
87
+
88
+ # Jupyter Notebook
89
+ .ipynb_checkpoints
90
+
91
+ # IPython
92
+ profile_default/
93
+ ipython_config.py
94
+
95
+ # pyenv
96
+ # For a library or package, you might want to ignore these files since the code is
97
+ # intended to run in multiple environments; otherwise, check them in:
98
+ # .python-version
99
+
100
+ # pipenv
101
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
102
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
103
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
104
+ # install all needed dependencies.
105
+ #Pipfile.lock
106
+
107
+ # poetry
108
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
109
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
110
+ # commonly ignored for libraries.
111
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
112
+ #poetry.lock
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ #pdm.lock
117
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
118
+ # in version control.
119
+ # https://pdm.fming.dev/#use-with-ide
120
+ .pdm.toml
121
+
122
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123
+ __pypackages__/
124
+
125
+ # Celery stuff
126
+ celerybeat-schedule
127
+ celerybeat.pid
128
+
129
+ # SageMath parsed files
130
+ *.sage.py
131
+
132
+ # Environments
133
+ .env
134
+ .venv
135
+ env/
136
+ venv/
137
+ ENV/
138
+ env.bak/
139
+ venv.bak/
140
+
141
+ # Spyder project settings
142
+ .spyderproject
143
+ .spyproject
144
+
145
+ # Rope project settings
146
+ .ropeproject
147
+
148
+ # mkdocs documentation
149
+ /site
150
+
151
+ # mypy
152
+ .mypy_cache/
153
+ .dmypy.json
154
+ dmypy.json
155
+
156
+ # Pyre type checker
157
+ .pyre/
158
+
159
+ # pytype static type analyzer
160
+ .pytype/
161
+
162
+ # Cython debug symbols
163
+ cython_debug/
164
+
165
+ # PyCharm
166
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
167
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
168
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
169
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
170
+ .idea/
171
+
172
+ # Spyder Projects
173
+ .spyderproject
@@ -0,0 +1,8 @@
1
+ v1.0.0 (developement)
2
+ =====================
3
+
4
+ Initial fork from scienceplots 2.1.1
5
+ - Add aps plot style
6
+ - Remove language styles
7
+ - Add SavedFigures context manager
8
+ - Use pathlib.Path and not os.path
@@ -0,0 +1,25 @@
1
+ MIT License
2
+
3
+ Original scienceplots pacakge
4
+ Copyright (c) 2018 John Garrett
5
+ StonerPlots changes
6
+ Copyright (c) 2024 Gavin Burnell
7
+
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ global-include *.mplstyle
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.1
2
+ Name: StonerPlots
3
+ Version: 1.0.0
4
+ Summary: This is a fork of scienceplots and provides a range of matplotlib styles for plotting physics...
5
+ Author-email: Gavin Burnell <G.Burnell@leeds.ac.uk>
6
+ Project-URL: Homepage, https://github.com/stonerlab/stonerplots/
7
+ Project-URL: Issues, https://github.com/stonerlab/stonerplots/issues
8
+ Keywords: matplotlib-style-sheets,matplotlib-figures,scientific-papers,thesis-template,matplotlib-styles,python
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.10
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+
16
+ Stoner Plots
17
+ =============
18
+
19
+ Stoner Plots is a fork of Science Plots
20
+
21
+ *Matplotlib styles for physics figures*
22
+
23
+ Usage
24
+ -----
25
+
26
+ Before using the new styles you need to import stonerplots - but it's ok to just import e.g. the SavedFigure context
27
+ manager:
28
+
29
+ from stonerplots import SavedFigure
30
+
31
+ with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
32
+ plt.figure()
33
+ plt.plot(x,y,label="Dataset")
34
+ ...
35
+
36
+ The SavedFigure context manager will handle the call to the matplotlib style context manager and will also save any
37
+ figures opened within the context manager. If the filename for the figure has an embedded place holder for {ix}, then
38
+ multiple figures can be saved without clobbering the filename.
39
+
40
+ There is also an InsetPlot context manager that can help you get insets placed correctly so that axes
41
+ labels don't escape over the edge of the surrounding figure.
42
+
43
+ with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
44
+ plt.figure()
45
+ plt.plot(x,y,label="Dataset")
46
+ ...
47
+ with InsetPlot(loc="lower right", width=0.25, height=0.25, padding=0.05) as inset:
48
+ inset.plot(x, model(x, 200), linestyle="--")
49
+
50
+
51
+ Available Styles
52
+ ----------------
53
+
54
+ * stoner - this is the base style sheet
55
+ * poster - makes everything bigger for printing on a poster
56
+ * notebook - makes things a little bigger for a Jupyter notebook - from the original scienceplots package
57
+ * presentation - a style suitable for the main graph on a powerpoint slide
58
+ * presentation_sm - a style for making 1/2 width graphs.
59
+
60
+ Journal Styles
61
+ --------------
62
+
63
+ * nature - for Nature group journals - from the original scienceplots package
64
+ * ieee - for IEEE Transactions journals - from the original scienceplots package
65
+ * aps - for American Physical Society Journals (like Phys Rev Lett etc.)
66
+
67
+ Modifiers
68
+ ---------
69
+
70
+ * aps1.5 - Switch to 1.5 column format
71
+ * aps2.0 - Switch to 2 column format
72
+
73
+ Colour Cycles
74
+ -------------
75
+
76
+ The default colour cycle is based on the London Underground map colour scheme (why not?) and goes
77
+
78
+ * Northern
79
+ * Central
80
+ * Picadily
81
+ * District
82
+ * Metropolitan
83
+ * Bakerloo
84
+ * JUbilee
85
+ * Overground
86
+ * Victoria
87
+ * Elizabeth
88
+ * Circle
89
+
90
+
91
+ This package draws heavily on scienceplots, so it seems only fair to cite the original work....
92
+
93
+ @article{StonerPlots,
94
+ author = {John D. Garrett},
95
+ title = {{garrettj403/SciencePlots}},
96
+ month = sep,
97
+ year = 2021,
98
+ publisher = {Zenodo},
99
+ version = {1.0.9},
100
+ doi = {10.5281/zenodo.4106649},
101
+ url = {http://doi.org/10.5281/zenodo.4106649}
102
+ }
@@ -0,0 +1,87 @@
1
+ Stoner Plots
2
+ =============
3
+
4
+ Stoner Plots is a fork of Science Plots
5
+
6
+ *Matplotlib styles for physics figures*
7
+
8
+ Usage
9
+ -----
10
+
11
+ Before using the new styles you need to import stonerplots - but it's ok to just import e.g. the SavedFigure context
12
+ manager:
13
+
14
+ from stonerplots import SavedFigure
15
+
16
+ with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
17
+ plt.figure()
18
+ plt.plot(x,y,label="Dataset")
19
+ ...
20
+
21
+ The SavedFigure context manager will handle the call to the matplotlib style context manager and will also save any
22
+ figures opened within the context manager. If the filename for the figure has an embedded place holder for {ix}, then
23
+ multiple figures can be saved without clobbering the filename.
24
+
25
+ There is also an InsetPlot context manager that can help you get insets placed correctly so that axes
26
+ labels don't escape over the edge of the surrounding figure.
27
+
28
+ with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
29
+ plt.figure()
30
+ plt.plot(x,y,label="Dataset")
31
+ ...
32
+ with InsetPlot(loc="lower right", width=0.25, height=0.25, padding=0.05) as inset:
33
+ inset.plot(x, model(x, 200), linestyle="--")
34
+
35
+
36
+ Available Styles
37
+ ----------------
38
+
39
+ * stoner - this is the base style sheet
40
+ * poster - makes everything bigger for printing on a poster
41
+ * notebook - makes things a little bigger for a Jupyter notebook - from the original scienceplots package
42
+ * presentation - a style suitable for the main graph on a powerpoint slide
43
+ * presentation_sm - a style for making 1/2 width graphs.
44
+
45
+ Journal Styles
46
+ --------------
47
+
48
+ * nature - for Nature group journals - from the original scienceplots package
49
+ * ieee - for IEEE Transactions journals - from the original scienceplots package
50
+ * aps - for American Physical Society Journals (like Phys Rev Lett etc.)
51
+
52
+ Modifiers
53
+ ---------
54
+
55
+ * aps1.5 - Switch to 1.5 column format
56
+ * aps2.0 - Switch to 2 column format
57
+
58
+ Colour Cycles
59
+ -------------
60
+
61
+ The default colour cycle is based on the London Underground map colour scheme (why not?) and goes
62
+
63
+ * Northern
64
+ * Central
65
+ * Picadily
66
+ * District
67
+ * Metropolitan
68
+ * Bakerloo
69
+ * JUbilee
70
+ * Overground
71
+ * Victoria
72
+ * Elizabeth
73
+ * Circle
74
+
75
+
76
+ This package draws heavily on scienceplots, so it seems only fair to cite the original work....
77
+
78
+ @article{StonerPlots,
79
+ author = {John D. Garrett},
80
+ title = {{garrettj403/SciencePlots}},
81
+ month = sep,
82
+ year = 2021,
83
+ publisher = {Zenodo},
84
+ version = {1.0.9},
85
+ doi = {10.5281/zenodo.4106649},
86
+ url = {http://doi.org/10.5281/zenodo.4106649}
87
+ }