StonerPlots 1.6.1__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 (190) hide show
  1. stonerplots-1.6.1/.github/workflows/build_conda.yaml +54 -0
  2. stonerplots-1.6.1/.github/workflows/publish_sphinx.yaml +20 -0
  3. stonerplots-1.6.1/.github/workflows/pytest.yaml +43 -0
  4. stonerplots-1.6.1/.gitignore +173 -0
  5. stonerplots-1.6.1/CHANGES.md +71 -0
  6. stonerplots-1.6.1/LICENSE +25 -0
  7. stonerplots-1.6.1/MANIFEST.in +1 -0
  8. stonerplots-1.6.1/PKG-INFO +163 -0
  9. stonerplots-1.6.1/README.md +148 -0
  10. stonerplots-1.6.1/docs/Makefile +20 -0
  11. stonerplots-1.6.1/docs/TEMPLATE.md +109 -0
  12. stonerplots-1.6.1/docs/make.bat +35 -0
  13. stonerplots-1.6.1/docs/requirements.txt +5 -0
  14. stonerplots-1.6.1/docs/source/_static/_ +0 -0
  15. stonerplots-1.6.1/docs/source/api/stonerplots.DoubleYAxis.rst +17 -0
  16. stonerplots-1.6.1/docs/source/api/stonerplots.InsetPlot.rst +17 -0
  17. stonerplots-1.6.1/docs/source/api/stonerplots.MultiPanel.rst +7 -0
  18. stonerplots-1.6.1/docs/source/api/stonerplots.PlotLabeller.rst +7 -0
  19. stonerplots-1.6.1/docs/source/api/stonerplots.SavedFigure.rst +7 -0
  20. stonerplots-1.6.1/docs/source/api/stonerplots.StackVertical.rst +7 -0
  21. stonerplots-1.6.1/docs/source/api/stonerplots.TexEngFormatter.rst +31 -0
  22. stonerplots-1.6.1/docs/source/api/stonerplots.TexFormatter.rst +21 -0
  23. stonerplots-1.6.1/docs/source/api/stonerplots.counter.rst +6 -0
  24. stonerplots-1.6.1/docs/source/api/stonerplots.roman.rst +6 -0
  25. stonerplots-1.6.1/docs/source/api.rst +9 -0
  26. stonerplots-1.6.1/docs/source/colours.rst +108 -0
  27. stonerplots-1.6.1/docs/source/conf.py +48 -0
  28. stonerplots-1.6.1/docs/source/doubleyaxis.rst +79 -0
  29. stonerplots-1.6.1/docs/source/figures/StonerLogo2.png +0 -0
  30. stonerplots-1.6.1/docs/source/figures/colours.png +0 -0
  31. stonerplots-1.6.1/docs/source/figures/colours10.png +0 -0
  32. stonerplots-1.6.1/docs/source/figures/colours50.png +0 -0
  33. stonerplots-1.6.1/docs/source/figures/colours70.png +0 -0
  34. stonerplots-1.6.1/docs/source/figures/colours90.png +0 -0
  35. stonerplots-1.6.1/docs/source/figures/example-1.png +0 -0
  36. stonerplots-1.6.1/docs/source/index.rst +84 -0
  37. stonerplots-1.6.1/docs/source/insetplot.rst +72 -0
  38. stonerplots-1.6.1/docs/source/multipanel.rst +124 -0
  39. stonerplots-1.6.1/docs/source/plotlabeller.rst +36 -0
  40. stonerplots-1.6.1/docs/source/savedfigure.rst +212 -0
  41. stonerplots-1.6.1/docs/source/stackvertical.rst +139 -0
  42. stonerplots-1.6.1/docs/source/style-gallery.rst +291 -0
  43. stonerplots-1.6.1/docs/source/userguide.rst +331 -0
  44. stonerplots-1.6.1/examples/data/xrr.dat +207 -0
  45. stonerplots-1.6.1/examples/figures/defaults.svg +1857 -0
  46. stonerplots-1.6.1/examples/figures/fig01a.png +0 -0
  47. stonerplots-1.6.1/examples/figures/fig01b.png +0 -0
  48. stonerplots-1.6.1/examples/figures/fig01c.png +0 -0
  49. stonerplots-1.6.1/examples/figures/fig02a.png +0 -0
  50. stonerplots-1.6.1/examples/figures/fig02b.pdf +0 -0
  51. stonerplots-1.6.1/examples/figures/fig02b.png +0 -0
  52. stonerplots-1.6.1/examples/figures/fig02c.png +0 -0
  53. stonerplots-1.6.1/examples/figures/fig02d.png +0 -0
  54. stonerplots-1.6.1/examples/figures/fig02e.png +0 -0
  55. stonerplots-1.6.1/examples/figures/fig02f.png +0 -0
  56. stonerplots-1.6.1/examples/figures/fig02g.png +0 -0
  57. stonerplots-1.6.1/examples/figures/fig02h_0.pdf +0 -0
  58. stonerplots-1.6.1/examples/figures/fig02h_0.png +0 -0
  59. stonerplots-1.6.1/examples/figures/fig02h_1.pdf +0 -0
  60. stonerplots-1.6.1/examples/figures/fig02h_1.png +0 -0
  61. stonerplots-1.6.1/examples/figures/fig02h_2.pdf +0 -0
  62. stonerplots-1.6.1/examples/figures/fig02h_2.png +0 -0
  63. stonerplots-1.6.1/examples/figures/fig02i_1.png +0 -0
  64. stonerplots-1.6.1/examples/figures/fig02i_2.png +0 -0
  65. stonerplots-1.6.1/examples/figures/fig02i_3.png +0 -0
  66. stonerplots-1.6.1/examples/figures/fig03.png +0 -0
  67. stonerplots-1.6.1/examples/figures/fig04a.png +0 -0
  68. stonerplots-1.6.1/examples/figures/fig04b.png +0 -0
  69. stonerplots-1.6.1/examples/figures/fig04c.png +0 -0
  70. stonerplots-1.6.1/examples/figures/fig04d.png +0 -0
  71. stonerplots-1.6.1/examples/figures/fig04e.png +0 -0
  72. stonerplots-1.6.1/examples/figures/fig04f.png +0 -0
  73. stonerplots-1.6.1/examples/figures/fig04g.png +0 -0
  74. stonerplots-1.6.1/examples/figures/fig04h.png +0 -0
  75. stonerplots-1.6.1/examples/figures/fig04i.png +0 -0
  76. stonerplots-1.6.1/examples/figures/fig05a.png +0 -0
  77. stonerplots-1.6.1/examples/figures/fig05b.svg +2285 -0
  78. stonerplots-1.6.1/examples/figures/fig05c.svg +2282 -0
  79. stonerplots-1.6.1/examples/figures/fig05d.svg +2261 -0
  80. stonerplots-1.6.1/examples/figures/fig05e.svg +1932 -0
  81. stonerplots-1.6.1/examples/figures/fig05f.png +0 -0
  82. stonerplots-1.6.1/examples/figures/fig05g.png +0 -0
  83. stonerplots-1.6.1/examples/figures/fig06.png +0 -0
  84. stonerplots-1.6.1/examples/figures/fig07a.png +0 -0
  85. stonerplots-1.6.1/examples/figures/fig7b.png +0 -0
  86. stonerplots-1.6.1/examples/figures/fig7c.png +0 -0
  87. stonerplots-1.6.1/examples/figures/fig7d.png +0 -0
  88. stonerplots-1.6.1/examples/figures/fig7e.svg +4654 -0
  89. stonerplots-1.6.1/examples/figures/genx_plot.png +0 -0
  90. stonerplots-1.6.1/examples/figures/pentaplot.png +0 -0
  91. stonerplots-1.6.1/examples/figures/trriplot.png +0 -0
  92. stonerplots-1.6.1/examples/figures/trriplot2.png +0 -0
  93. stonerplots-1.6.1/examples/matplotlibrc +798 -0
  94. stonerplots-1.6.1/examples/plot-examples.py +18 -0
  95. stonerplots-1.6.1/examples/plot_examples/__init__.py +46 -0
  96. stonerplots-1.6.1/examples/plot_examples/common.py +18 -0
  97. stonerplots-1.6.1/examples/plot_examples/dark_plot.py +14 -0
  98. stonerplots-1.6.1/examples/plot_examples/default_plot-double-y.py +24 -0
  99. stonerplots-1.6.1/examples/plot_examples/default_plot.py +14 -0
  100. stonerplots-1.6.1/examples/plot_examples/default_plot_aip.py +14 -0
  101. stonerplots-1.6.1/examples/plot_examples/default_plot_aps.py +14 -0
  102. stonerplots-1.6.1/examples/plot_examples/default_plot_aps_1_5_column.py +14 -0
  103. stonerplots-1.6.1/examples/plot_examples/default_plot_aps_2_column.py +14 -0
  104. stonerplots-1.6.1/examples/plot_examples/default_plot_bright.py +14 -0
  105. stonerplots-1.6.1/examples/plot_examples/default_plot_defaults.py +18 -0
  106. stonerplots-1.6.1/examples/plot_examples/default_plot_extra_context.py +17 -0
  107. stonerplots-1.6.1/examples/plot_examples/default_plot_high_contrast.py +14 -0
  108. stonerplots-1.6.1/examples/plot_examples/default_plot_high_vis.py +14 -0
  109. stonerplots-1.6.1/examples/plot_examples/default_plot_ieee.py +14 -0
  110. stonerplots-1.6.1/examples/plot_examples/default_plot_iop.py +14 -0
  111. stonerplots-1.6.1/examples/plot_examples/default_plot_labeller.py +15 -0
  112. stonerplots-1.6.1/examples/plot_examples/default_plot_latex.py +14 -0
  113. stonerplots-1.6.1/examples/plot_examples/default_plot_light.py +14 -0
  114. stonerplots-1.6.1/examples/plot_examples/default_plot_muted.py +14 -0
  115. stonerplots-1.6.1/examples/plot_examples/default_plot_nature.py +14 -0
  116. stonerplots-1.6.1/examples/plot_examples/default_plot_retro.py +14 -0
  117. stonerplots-1.6.1/examples/plot_examples/default_plot_science.py +34 -0
  118. stonerplots-1.6.1/examples/plot_examples/default_plot_std_colours.py +14 -0
  119. stonerplots-1.6.1/examples/plot_examples/default_plot_thesis.py +25 -0
  120. stonerplots-1.6.1/examples/plot_examples/default_plot_vibrant.py +14 -0
  121. stonerplots-1.6.1/examples/plot_examples/grid_plot.py +14 -0
  122. stonerplots-1.6.1/examples/plot_examples/hi_res_plot.py +14 -0
  123. stonerplots-1.6.1/examples/plot_examples/inset_plot.py +20 -0
  124. stonerplots-1.6.1/examples/plot_examples/med_res_plot.py +14 -0
  125. stonerplots-1.6.1/examples/plot_examples/multi_panel_plot-presentation.py +15 -0
  126. stonerplots-1.6.1/examples/plot_examples/multi_panel_plot.py +15 -0
  127. stonerplots-1.6.1/examples/plot_examples/notebook_plot.py +14 -0
  128. stonerplots-1.6.1/examples/plot_examples/penta_plot.py +18 -0
  129. stonerplots-1.6.1/examples/plot_examples/poster_plot.py +15 -0
  130. stonerplots-1.6.1/examples/plot_examples/presentation_plot.py +15 -0
  131. stonerplots-1.6.1/examples/plot_examples/scatter_plot.py +24 -0
  132. stonerplots-1.6.1/examples/plot_examples/small_presentation_dark_plot.py +19 -0
  133. stonerplots-1.6.1/examples/plot_examples/small_presentation_plot.py +17 -0
  134. stonerplots-1.6.1/examples/plot_examples/stacked_plot.py +16 -0
  135. stonerplots-1.6.1/examples/plot_examples/tri_plot.py +18 -0
  136. stonerplots-1.6.1/examples/plot_examples/tri_plot2.py +18 -0
  137. stonerplots-1.6.1/examples/plot_examples/xrr_example.py +35 -0
  138. stonerplots-1.6.1/pyproject.toml +41 -0
  139. stonerplots-1.6.1/recipe/build-env.yml +12 -0
  140. stonerplots-1.6.1/recipe/meta.yaml +44 -0
  141. stonerplots-1.6.1/setup.cfg +4 -0
  142. stonerplots-1.6.1/setup.py +26 -0
  143. stonerplots-1.6.1/src/StonerPlots.egg-info/PKG-INFO +163 -0
  144. stonerplots-1.6.1/src/StonerPlots.egg-info/SOURCES.txt +188 -0
  145. stonerplots-1.6.1/src/StonerPlots.egg-info/dependency_links.txt +1 -0
  146. stonerplots-1.6.1/src/StonerPlots.egg-info/top_level.txt +1 -0
  147. stonerplots-1.6.1/src/stonerplots/__init__.py +77 -0
  148. stonerplots-1.6.1/src/stonerplots/colours.py +117 -0
  149. stonerplots-1.6.1/src/stonerplots/context.py +1398 -0
  150. stonerplots-1.6.1/src/stonerplots/format.py +180 -0
  151. stonerplots-1.6.1/src/stonerplots/styles/color/bright.mplstyle +6 -0
  152. stonerplots-1.6.1/src/stonerplots/styles/color/high-contrast.mplstyle +6 -0
  153. stonerplots-1.6.1/src/stonerplots/styles/color/high-vis.mplstyle +4 -0
  154. stonerplots-1.6.1/src/stonerplots/styles/color/light.mplstyle +6 -0
  155. stonerplots-1.6.1/src/stonerplots/styles/color/muted.mplstyle +6 -0
  156. stonerplots-1.6.1/src/stonerplots/styles/color/retro.mplstyle +4 -0
  157. stonerplots-1.6.1/src/stonerplots/styles/color/std-colours.mplstyle +4 -0
  158. stonerplots-1.6.1/src/stonerplots/styles/color/stoner_dark.mplstyle +31 -0
  159. stonerplots-1.6.1/src/stonerplots/styles/color/vibrant.mplstyle +6 -0
  160. stonerplots-1.6.1/src/stonerplots/styles/journals/aaas-science.mplstyle +49 -0
  161. stonerplots-1.6.1/src/stonerplots/styles/journals/aip.mplstyle +33 -0
  162. stonerplots-1.6.1/src/stonerplots/styles/journals/aps.mplstyle +44 -0
  163. stonerplots-1.6.1/src/stonerplots/styles/journals/ieee.mplstyle +22 -0
  164. stonerplots-1.6.1/src/stonerplots/styles/journals/iop.mplstyle +33 -0
  165. stonerplots-1.6.1/src/stonerplots/styles/journals/nature.mplstyle +32 -0
  166. stonerplots-1.6.1/src/stonerplots/styles/misc/grid.mplstyle +15 -0
  167. stonerplots-1.6.1/src/stonerplots/styles/misc/pgf.mplstyle +3 -0
  168. stonerplots-1.6.1/src/stonerplots/styles/modifiers/aip2.mplstyle +6 -0
  169. stonerplots-1.6.1/src/stonerplots/styles/modifiers/aps1.5.mplstyle +6 -0
  170. stonerplots-1.6.1/src/stonerplots/styles/modifiers/aps2.mplstyle +6 -0
  171. stonerplots-1.6.1/src/stonerplots/styles/modifiers/hi-res.mplstyle +3 -0
  172. stonerplots-1.6.1/src/stonerplots/styles/modifiers/latex-sans.mplstyle +11 -0
  173. stonerplots-1.6.1/src/stonerplots/styles/modifiers/latex.mplstyle +11 -0
  174. stonerplots-1.6.1/src/stonerplots/styles/modifiers/med-res.mplstyle +3 -0
  175. stonerplots-1.6.1/src/stonerplots/styles/modifiers/no-latex.mplstyle +10 -0
  176. stonerplots-1.6.1/src/stonerplots/styles/modifiers/presentation_dark.mplstyle +13 -0
  177. stonerplots-1.6.1/src/stonerplots/styles/modifiers/presentation_sm.mplstyle +4 -0
  178. stonerplots-1.6.1/src/stonerplots/styles/modifiers/sans.mplstyle +10 -0
  179. stonerplots-1.6.1/src/stonerplots/styles/modifiers/science-2col.mplstyle +2 -0
  180. stonerplots-1.6.1/src/stonerplots/styles/modifiers/science-3col.mplstyle +2 -0
  181. stonerplots-1.6.1/src/stonerplots/styles/modifiers/thesis-sm.mplstyle +4 -0
  182. stonerplots-1.6.1/src/stonerplots/styles/notebook.mplstyle +36 -0
  183. stonerplots-1.6.1/src/stonerplots/styles/poster.mplstyle +45 -0
  184. stonerplots-1.6.1/src/stonerplots/styles/presentation.mplstyle +37 -0
  185. stonerplots-1.6.1/src/stonerplots/styles/scatter.mplstyle +7 -0
  186. stonerplots-1.6.1/src/stonerplots/styles/stoner.mplstyle +78 -0
  187. stonerplots-1.6.1/src/stonerplots/styles/thesis.mplstyle +35 -0
  188. stonerplots-1.6.1/src/stonerplots/util.py +326 -0
  189. stonerplots-1.6.1/tests/pytest-env.yaml +11 -0
  190. stonerplots-1.6.1/tests/stonerplots/test_exampl;es.py +29 -0
@@ -0,0 +1,54 @@
1
+
2
+ name: Conda
3
+
4
+ on:
5
+ release:
6
+ types: ['released', 'prereleased']
7
+
8
+ # workflow_dispatch: # Un comment line if you also want to trigger action manually
9
+ defaults:
10
+ run:
11
+ shell: bash -l {0}
12
+ jobs:
13
+ conda_deployment_with_new_tag:
14
+ name: Conda deployment of package for platform ${{ matrix.os }} with Python ${{ matrix.python-version }}
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ os: [ ubuntu-latest ]
19
+ python-version: ["3.10"]
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
24
+ - name: Conda environment creation and activation
25
+ uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+ environment-file: recipe/build-env.yml # Path to the build conda environment
29
+ activate-environment: build-environment
30
+ auto-update-conda: true
31
+ auto-activate-base: false
32
+ show-channel-urls: true
33
+ - name: Set VERSION environment variable
34
+ run: |
35
+ export VERSION=`python setup.py --version`
36
+ echo "VERSION=$VERSION" >> "$GITHUB_ENV"
37
+ - name: Build and upload the conda packages
38
+ uses: uibcdf/action-build-and-upload-conda-packages@d72a2d950af55243bbc385185dd68b824211192d
39
+ with:
40
+ meta_yaml_dir: recipe
41
+ python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
42
+ user: phygbu
43
+ label: auto
44
+ overwrite: true
45
+ token: ${{ secrets.ANACONDA }} # Replace with the right name of your secret
46
+ - name: Build and upload wheel
47
+ env:
48
+ TWINE_USERNAME: __token__
49
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
50
+ run: |
51
+ cd /home/runner/work/stonerplots/stonerplots
52
+ conda info
53
+ python -m build
54
+ twine upload dist/*
@@ -0,0 +1,20 @@
1
+ name: Build Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # branch to trigger deployment
6
+
7
+ jobs:
8
+ pages:
9
+ runs-on: ubuntu-20.04
10
+ environment:
11
+ name: github-pages
12
+ url: ${{ steps.deployment.outputs.page_url }}
13
+ permissions:
14
+ pages: write
15
+ id-token: write
16
+ steps:
17
+ - id: deployment
18
+ uses: sphinx-notes/pages@3a7b173ecba074b270b37c64007c1edfd8465892
19
+ with:
20
+ documentation_path: ./docs/source
@@ -0,0 +1,43 @@
1
+ name: pytest
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # branch to trigger deployment
6
+
7
+ # workflow_dispatch: # Un comment line if you also want to trigger action manually
8
+ defaults:
9
+ run:
10
+ shell: bash -l {0}
11
+ jobs:
12
+ conda_deployment_with_new_tag:
13
+ name: Conda deployment of package for platform ${{ matrix.os }} with Python ${{ matrix.python-version }}
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ matrix:
17
+ os: [ ubuntu-latest ]
18
+ python-version: ["3.10"]
19
+
20
+ steps:
21
+ - name: Setup TeX Live
22
+ run: sudo apt-get install -y texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended cm-super dvipng
23
+ - name: Checkout
24
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25
+ - uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246
26
+ with:
27
+ environment-name: myenv
28
+ create-args: >-
29
+ python=3.10
30
+ pytest
31
+ numpy
32
+ pytest-md
33
+ pytest-emoji
34
+ matplotlib
35
+ - name: Run pytest
36
+ uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
37
+ with:
38
+ verbose: true
39
+ emoji: true
40
+ job-summary: true
41
+ custom-arguments: '-q'
42
+ click-to-expand: true
43
+ report-title: 'Test Report'
@@ -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,71 @@
1
+ # Changelog
2
+
3
+ ## v1.6.0 Release
4
+
5
+ New features
6
+
7
+ - Added the inset autolocator code.
8
+ - Added a medium resolution style sheet.
9
+ - PlotLabeller context manager to apply axes formatting to new figures.
10
+ - Additional Formatting functions from the stoner Package.
11
+ - Added a DoubleYAxis context manager for helping with double-y axis plots.
12
+
13
+ ## v1.5.2 Release
14
+
15
+ Further code cleanups following codacy code quality checks.
16
+
17
+ ## v1.5.1 Release
18
+
19
+ Some refactoring of the context managers and other code cleanups. No intentional changes to the API.
20
+
21
+ ## v1.5.0 Release
22
+
23
+ Iregular grids in MultuPanel now can also do different numbers of rows in each column with the _transpose_ parameter.
24
+
25
+ ## v1.4.0 Release
26
+
27
+ Iregullar grids in MultiPanel that support different numbers of plots in each row.
28
+
29
+ ## v1.3.2 Release
30
+
31
+ Improve StackVertical to allow asymmetric stacked plots and make an example for plotting
32
+ GenX fits.
33
+
34
+ - Add AAAS-Science stylesheet with 2 and 3 column variants.
35
+ - Improve SavedFigure to make it reusable and also adjustable after creation via call method.
36
+ - Improvements to StackVertical and MultiPanel to do more calculations with plot transforms.
37
+
38
+ ## v1.3.1 Thesis Style
39
+
40
+ Add a stylesheet that tries to match the CM Group's LaTeX thesis template.
41
+
42
+ ## v1.3.0 New MultiPanel Context Manager
43
+
44
+ Add a context manager for making multipanel figures more easily.
45
+
46
+ - MultiPanel Context Manger
47
+ - Improve documentation some more
48
+
49
+ ## v1.2.0 New StackVertical Context Manager
50
+
51
+ Add a context manager for producing vertically stacked plots in a constrained layout.
52
+
53
+ - StackVertical added
54
+ - Rework examples into separate scripts
55
+ - Add Sphinx docs
56
+
57
+ ## v1.1.0 New Stylesheets
58
+
59
+ Add New stylesheets to the package
60
+
61
+ - Add IOP styles
62
+ - Get package building running
63
+
64
+ ## v1.0.0 (developement)
65
+
66
+ Initial fork from scienceplots 2.1.1
67
+
68
+ - Add aps plot style
69
+ - Remove language styles
70
+ - Add SavedFigures context manager
71
+ - 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,163 @@
1
+ Metadata-Version: 2.2
2
+ Name: StonerPlots
3
+ Version: 1.6.1
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
+ [![GitHub version](https://badge.fury.io/gh/stonerlab%2Fstonerplots.svg)](https://badge.fury.io/gh/stonerlab%2Fstonerplots)
17
+ [![pytest](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/pytest.yaml)
18
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/bc7404ac3cbf432184a13b6c3cb88ea4)](https://app.codacy.com/gh/stonerlab/stonerplots/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
19
+ [![PyPI version](https://badge.fury.io/py/StonerPlots.svg)](https://badge.fury.io/py/StonerPlots)
20
+ [![Build Docs](https://github.com/stonerlab/stonerplots/actions/workflows/publish_sphinx.yaml/badge.svg)](https://stonerlab.github.io/stonerplots/)
21
+ [![Conda](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml/badge.svg)](https://github.com/stonerlab/stonerplots/actions/workflows/build_conda.yaml)
22
+ [![Conda Version](https://anaconda.org/phygbu/stonerplots/badges/version.svg)](https://anaconda.org/phygbu/stonerplots)
23
+ ![Not platform specific](https://anaconda.org/phygbu/stonerplots/badges/platforms.svg)
24
+ ![MIT Licensed](https://anaconda.org/phygbu/stonerplots/badges/license.svg)
25
+ [![DOI](https://zenodo.org/badge/776970304.svg)](https://zenodo.org/doi/10.5281/zenodo.10905673)
26
+
27
+ # Stoner Plots
28
+
29
+ Stoner Plots is a fork of Science Plots with additional features to make plotting of scientific plots easier.
30
+
31
+ <img src="https://raw.githubusercontent.com/stonerlab/stonerplots/main/examples/figures/fig05a.png" width=640 alt="Presentation Style Image"/>
32
+
33
+ ## Usage
34
+
35
+ Before using the new styles you need to import stonerplots - but you will most likely also want to make use of
36
+ one of the context managers - the `SavedFigure` class.
37
+
38
+ from stonerplots import SavedFigure
39
+
40
+ with SavedFigure("my_figure.pdf", style=["stoner","aps"]):
41
+ plt.figure()
42
+ plt.plot(x,y,label="Dataset")
43
+ ...
44
+
45
+ There are three main parts to this package::
46
+
47
+ 1. A set of matplotlib style sheets for making lots wih styles suitable for a variety of Physics related journals
48
+ and formats such as presentations and posters as well as reports and theses.
49
+
50
+ 1. A set of Python Content managers designed to help with the process of preparing production quality figures in
51
+ matplotlib.
52
+
53
+ 1. Soem defintitions of colours based on the Transport for London colour palette and inserted as named colours into
54
+ the matplotlib colour tables.
55
+
56
+ The package is fully documented (see link below) and comes with a set of examples that also server as unit tests.
57
+
58
+ ## Documentation
59
+
60
+ Documentation can be found on the [github pages for this repository](https://stonerlab.github.io/stonerplots/index.html).
61
+
62
+ ## Available Styles
63
+
64
+ ### Core Styles
65
+
66
+ - stoner - this is the base style sheet
67
+ - poster - makes everything bigger for printing on a poster
68
+ - notebook - makes things a little bigger for a Jupyter notebook - from the original scienceplots package
69
+ - presentation - a style suitable for the main graph on a powerpoint slide
70
+ - thesis - a style that tries to look like the CM Physics group LaTeX thesis template
71
+
72
+ ### Journal Styles
73
+
74
+ - nature - for Nature group journals - from the original scienceplots package
75
+ - aaas-science - Science single columne style.
76
+ - ieee - for IEEE Transactions journals - from the original scienceplots package
77
+ - aps - for American Physical Society Journals (like Phys Rev Lett etc.)
78
+ - aip - for AIP journals such as Applied Physics Letters - labels in Serif Fonts
79
+ - iop - for Institute of Physics Journals.
80
+
81
+ ### Modifiers
82
+
83
+ - aps1.5 - Switch to 1.5 column wide format
84
+ - aps2.0 - Switch to 2 column wide format
85
+ - aip2 - Switch to 2 column wide format for AIP journals
86
+ - stoner-dark - Switch to a dark background a lighter plotting colours.
87
+ - hi-res - Switches to 600dpi plotting (but using eps, pdf or svg is generally a better option)
88
+ - med-res - like hi-res, but switches to 300dpi plotting.
89
+ - presentation_sm - a style for making 1/2 width graphs.
90
+ - presentation_dark - tweak the weight of elements for dark presnetations.
91
+ - science-2col, science-3col - Science 2 and 3 column width figures
92
+ - thesis-sm - reduces the figure width to make the axes closer to 4/3 aspect ratio.
93
+
94
+ ## Context Managers
95
+
96
+ The package is designed to work by using python context managers to aid plotting. These include:
97
+
98
+ - SavedFigure - apply style sheets and then save any resulting figures to disc in one or more formats
99
+ - StackVertical - make a multi-panel plot where the panels are arranged in a vertical stack and pushed together so that
100
+ the top-x-axis on one frame is the bottom of the next.
101
+ - MultiPanel - a general; purpose miulti-panel plotting helper.
102
+ - InsetPlot - create an inset set of axes.
103
+ - DoubleYAxis - setup the righthand y axis for a second scale and optional colour the y-axes differently and merge
104
+ the legend into a single legend.
105
+
106
+ ## Colour Cycles
107
+
108
+ The default colour cycle is based on the London Underground map colour scheme (why not?) and goes
109
+
110
+ - Northern
111
+ - Central
112
+ - Picadily
113
+ - District
114
+ - Metropolitan
115
+ - Bakerloo
116
+ - Jubilee
117
+ - Overground
118
+ - Victoria
119
+ - Elizabeth
120
+ - Circle
121
+
122
+ ## Reference
123
+
124
+ The package adds these as named colours in matplotlib, along with 90,50,70 and 10% shade variants of some of them. See
125
+ the [documentation page on colours](https://stonerlab.github.io/stonerplots/colours.html) for a full list.
126
+
127
+ This package draws heavily on [scienceplots](https://github.com/garrettj403/SciencePlots), so it
128
+ seems only fair to cite the original work....
129
+
130
+ @software{john_garrett_2023_10206719,
131
+ author = {John Garrett and
132
+ Echedey Luis and
133
+ H.-H. Peng and
134
+ Tim Cera and
135
+ gobinathj and
136
+ Josh Borrow and
137
+ Mehmet Keçeci and
138
+ Splines and
139
+ Suraj Iyer and
140
+ Yuming Liu and
141
+ cjw and
142
+ Mikhail Gasanov},
143
+ title = {garrettj403/SciencePlots: 2.1.1},
144
+ month = nov,
145
+ year = 2023,
146
+ publisher = {Zenodo},
147
+ version = {2.1.1},
148
+ doi = {10.5281/zenodo.10206719},
149
+ url = {https://doi.org/10.5281/zenodo.10206719},
150
+ }
151
+
152
+ The doi and BibTex reference for stonerplots is: https://doi.org/10.5281/zenodo.14026874
153
+
154
+ @software{gavin_burnell_2024_14026874,
155
+ author = {Gavin Burnell},
156
+ title = {stonerlab/stonerplots},
157
+ month = nov,
158
+ year = 2024,
159
+ publisher = {Zenodo},
160
+ version = {v1.5.2},
161
+ doi = {10.5281/zenodo.14026874},
162
+ url = {https://doi.org/10.5281/zenodo.14026874},
163
+ }