myplotlib 1.5.0__tar.gz → 1.6.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 (83) hide show
  1. {myplotlib-1.5.0 → myplotlib-1.6.0}/.gitignore +0 -1
  2. myplotlib-1.6.0/.taplo.toml +6 -0
  3. myplotlib-1.6.0/.vscode/extensions.json +8 -0
  4. myplotlib-1.6.0/.vscode/settings.json +7 -0
  5. {myplotlib-1.5.0 → myplotlib-1.6.0}/PKG-INFO +21 -15
  6. {myplotlib-1.5.0 → myplotlib-1.6.0}/README.md +19 -13
  7. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/__init__.py +1 -1
  8. myplotlib-1.6.0/myplotlib/assets/classic.dark.mplstyle +69 -0
  9. myplotlib-1.6.0/myplotlib/assets/classic.light.mplstyle +60 -0
  10. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/fancy.dark.mplstyle +20 -5
  11. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/fancy.light.mplstyle +18 -4
  12. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexHeavy.ttf +0 -0
  13. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexHeavyItalic.ttf +0 -0
  14. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexLight.ttf +0 -0
  15. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexLightItalic.ttf +0 -0
  16. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexMedium.ttf +0 -0
  17. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyComplexMediumItalic.ttf +0 -0
  18. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexHeavy.ttf +0 -0
  19. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexHeavyItalic.ttf +0 -0
  20. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexLight.ttf +0 -0
  21. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexLightItalic.ttf +0 -0
  22. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexMedium.ttf +0 -0
  23. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheyDuplexMediumItalic.ttf +0 -0
  24. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexHeavy.ttf +0 -0
  25. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexHeavyItalic.ttf +0 -0
  26. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexLight.ttf +0 -0
  27. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexLightItalic.ttf +0 -0
  28. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexMedium.ttf +0 -0
  29. myplotlib-1.6.0/myplotlib/assets/fonts/Hershey/AVHersheySimplexMediumItalic.ttf +0 -0
  30. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/mono.dark.mplstyle +4 -4
  31. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/mono.light.mplstyle +3 -3
  32. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/tests.py +13 -5
  33. myplotlib-1.6.0/previews/README.md +32 -0
  34. myplotlib-1.6.0/previews/classic_dark.png +0 -0
  35. myplotlib-1.6.0/previews/classic_light.png +0 -0
  36. {myplotlib-1.5.0 → myplotlib-1.6.0}/previews/export_previews.py +6 -6
  37. myplotlib-1.6.0/previews/fancy_dark.png +0 -0
  38. myplotlib-1.6.0/previews/fancy_light.png +0 -0
  39. myplotlib-1.6.0/previews/latex.png +0 -0
  40. myplotlib-1.6.0/previews/mono_dark.png +0 -0
  41. myplotlib-1.6.0/previews/mono_light.png +0 -0
  42. myplotlib-1.6.0/previews/plain.png +0 -0
  43. myplotlib-1.6.0/pyproject.toml +44 -0
  44. myplotlib-1.6.0/shell.nix +45 -0
  45. myplotlib-1.5.0/myplotlib/assets/fonts/HersheyTex-Book.otf +0 -0
  46. myplotlib-1.5.0/myplotlib/assets/fonts/HersheyTex-Light.otf +0 -0
  47. myplotlib-1.5.0/myplotlib/assets/hershey.dark.mplstyle +0 -28
  48. myplotlib-1.5.0/myplotlib/assets/hershey.light.mplstyle +0 -21
  49. myplotlib-1.5.0/previews/README.md +0 -32
  50. myplotlib-1.5.0/previews/fancy_dark.jpg +0 -0
  51. myplotlib-1.5.0/previews/fancy_light.jpg +0 -0
  52. myplotlib-1.5.0/previews/hershey_dark.jpg +0 -0
  53. myplotlib-1.5.0/previews/hershey_light.jpg +0 -0
  54. myplotlib-1.5.0/previews/latex.jpg +0 -0
  55. myplotlib-1.5.0/previews/mono_dark.jpg +0 -0
  56. myplotlib-1.5.0/previews/mono_light.jpg +0 -0
  57. myplotlib-1.5.0/previews/plain.jpg +0 -0
  58. myplotlib-1.5.0/pyproject.toml +0 -40
  59. {myplotlib-1.5.0 → myplotlib-1.6.0}/.github/workflows/pypi-publish.yml +0 -0
  60. {myplotlib-1.5.0 → myplotlib-1.6.0}/LICENSE +0 -0
  61. {myplotlib-1.5.0 → myplotlib-1.6.0}/MANIFEST.in +0 -0
  62. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/bipolar.csv +0 -0
  63. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/colt.csv +0 -0
  64. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/fire.csv +0 -0
  65. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/idl.csv +0 -0
  66. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/sunrise.csv +0 -0
  67. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/thermal.csv +0 -0
  68. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/colormaps/vanilla.csv +0 -0
  69. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/fonts/AppleChancery.ttf +0 -0
  70. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-Bold.ttf +0 -0
  71. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-BoldItalic.ttf +0 -0
  72. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-ExtraBold.ttf +0 -0
  73. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-ExtraBoldItalic.ttf +0 -0
  74. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-Italic.ttf +0 -0
  75. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-Medium.ttf +0 -0
  76. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-MediumItalic.ttf +0 -0
  77. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-Regular.ttf +0 -0
  78. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-SemiBold.ttf +0 -0
  79. {myplotlib-1.5.0/myplotlib/assets/fonts → myplotlib-1.6.0/myplotlib/assets/fonts/EBGaramond}/EBGaramond-SemiBoldItalic.ttf +0 -0
  80. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/assets/latex.mplstyle +0 -0
  81. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/plots.py +0 -0
  82. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/tools/__init__.py +0 -0
  83. {myplotlib-1.5.0 → myplotlib-1.6.0}/myplotlib/tools/lic.py +0 -0
@@ -11,7 +11,6 @@ build/
11
11
 
12
12
  *.ipynb
13
13
 
14
- .vscode
15
14
  *.drawio
16
15
  *.ipynb
17
16
 
@@ -0,0 +1,6 @@
1
+ [formatting]
2
+ align_entries = true
3
+ indent_tables = true
4
+ indent_entries = true
5
+ trailing_newline = true
6
+ align_comments = true
@@ -0,0 +1,8 @@
1
+ {
2
+ "recommendations": [
3
+ "tamasfe.even-better-toml",
4
+ "yy0931.mplstyle",
5
+ "ms-python.black-formatter",
6
+ "ms-python.python"
7
+ ]
8
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "[toml]": {
3
+ "editor.defaultFormatter": "tamasfe.even-better-toml"
4
+ },
5
+ "evenBetterToml.taplo.configFile.enabled": true,
6
+ "evenBetterToml.taplo.configFile.path": ".taplo.toml",
7
+ }
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: myplotlib
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: `matplotlib` binder with custom styles and routines for fast plotting
5
5
  Project-URL: Repository, https://github.com/haykh/myplotlib
6
6
  Author-email: Hayk <haykh.astro@gmail.com>
@@ -56,15 +56,15 @@ Description-Content-Type: text/markdown
56
56
 
57
57
  `matplotlib` binder with custom styles and routines for fast plotting. see [previews of available styles](https://github.com/haykh/myplotlib/tree/master/previews#readme).
58
58
 
59
- ### installation
59
+ ## installation
60
60
 
61
61
  ```shell
62
62
  pip install myplotlib
63
63
  ```
64
64
 
65
- ### usage
65
+ ## usage
66
66
 
67
- #### loading style, fonts & colormaps
67
+ ### loading style, fonts & colormaps
68
68
 
69
69
  ```python
70
70
  import myplotlib
@@ -73,7 +73,7 @@ import matplotlib.pyplot as plt
73
73
  plt.style.use(STYLE)
74
74
  # STYLE can be:
75
75
  # - fancy.dark, fancy.light
76
- # - hershey.dark, hershey.light
76
+ # - classic.dark, classic.light
77
77
  # - mono.dark, mono.light
78
78
  # - latex
79
79
 
@@ -85,7 +85,7 @@ with plt.style.context(STYLE):
85
85
  plt.plot(...)
86
86
  ```
87
87
 
88
- #### auxiliary plotting functions
88
+ ### auxiliary plotting functions
89
89
 
90
90
  ```python
91
91
  import myplotlib.plots as myplt
@@ -103,22 +103,28 @@ mypltest?
103
103
 
104
104
  for more usage examples checkout the `tests/` submodule.
105
105
 
106
- ### requirements
106
+ ## requirements
107
107
 
108
108
  * `python >= 3.8`
109
109
  * `matplotlib >= 3.5.0`, `numpy`
110
- * `latex` (used for `style="fancy"` only)
110
+ * `latex` (used for `fancy` and `latex` only)
111
111
  * `numba>=0.57.0`
112
112
 
113
- ### development
113
+ ## development
114
114
 
115
- Building tarballs in the `dist` directory:
115
+ when deploying a new version, there are three necessary steps to take.
116
116
 
117
- ```sh
118
- python -m build --sdist --outdir dist .
119
- ```
117
+ 1. increase the version string in `myplotlib/__init__.py`.
118
+ 2. generate the previews:
119
+ ```sh
120
+ python3 previews/export_previews.py
121
+ ```
122
+ 3. build the new tarballs in the `dist` directory:
123
+ ```sh
124
+ python -m build --sdist --outdir dist .
125
+ ```
120
126
 
121
- ### To-do
127
+ ## To-do
122
128
 
123
129
  - [ ] isocontour plotting
124
130
  - [x] add streamplot for fieldline plotting
@@ -2,15 +2,15 @@
2
2
 
3
3
  `matplotlib` binder with custom styles and routines for fast plotting. see [previews of available styles](https://github.com/haykh/myplotlib/tree/master/previews#readme).
4
4
 
5
- ### installation
5
+ ## installation
6
6
 
7
7
  ```shell
8
8
  pip install myplotlib
9
9
  ```
10
10
 
11
- ### usage
11
+ ## usage
12
12
 
13
- #### loading style, fonts & colormaps
13
+ ### loading style, fonts & colormaps
14
14
 
15
15
  ```python
16
16
  import myplotlib
@@ -19,7 +19,7 @@ import matplotlib.pyplot as plt
19
19
  plt.style.use(STYLE)
20
20
  # STYLE can be:
21
21
  # - fancy.dark, fancy.light
22
- # - hershey.dark, hershey.light
22
+ # - classic.dark, classic.light
23
23
  # - mono.dark, mono.light
24
24
  # - latex
25
25
 
@@ -31,7 +31,7 @@ with plt.style.context(STYLE):
31
31
  plt.plot(...)
32
32
  ```
33
33
 
34
- #### auxiliary plotting functions
34
+ ### auxiliary plotting functions
35
35
 
36
36
  ```python
37
37
  import myplotlib.plots as myplt
@@ -49,22 +49,28 @@ mypltest?
49
49
 
50
50
  for more usage examples checkout the `tests/` submodule.
51
51
 
52
- ### requirements
52
+ ## requirements
53
53
 
54
54
  * `python >= 3.8`
55
55
  * `matplotlib >= 3.5.0`, `numpy`
56
- * `latex` (used for `style="fancy"` only)
56
+ * `latex` (used for `fancy` and `latex` only)
57
57
  * `numba>=0.57.0`
58
58
 
59
- ### development
59
+ ## development
60
60
 
61
- Building tarballs in the `dist` directory:
61
+ when deploying a new version, there are three necessary steps to take.
62
62
 
63
- ```sh
64
- python -m build --sdist --outdir dist .
65
- ```
63
+ 1. increase the version string in `myplotlib/__init__.py`.
64
+ 2. generate the previews:
65
+ ```sh
66
+ python3 previews/export_previews.py
67
+ ```
68
+ 3. build the new tarballs in the `dist` directory:
69
+ ```sh
70
+ python -m build --sdist --outdir dist .
71
+ ```
66
72
 
67
- ### To-do
73
+ ## To-do
68
74
 
69
75
  - [ ] isocontour plotting
70
76
  - [x] add streamplot for fieldline plotting
@@ -1,4 +1,4 @@
1
- __version__ = "1.5.0"
1
+ __version__ = "1.6.0"
2
2
 
3
3
 
4
4
  import os
@@ -0,0 +1,69 @@
1
+ axes.prop_cycle: cycler("color", ["FFFFFF", "FF5555", "5555FF", "55FF55", "FF55FF", "55FFFF", "FFFF55", "AAAAAA"])
2
+ figure.dpi: 150
3
+
4
+ # Set x axis
5
+ xtick.direction: in
6
+ xtick.major.size: 6.0
7
+ # xtick.major.width: 1.5
8
+ xtick.major.pad: 5
9
+ xtick.minor.size: 4
10
+ xtick.minor.visible: True
11
+ xtick.top: True
12
+
13
+ # Set y axis
14
+ ytick.direction: in
15
+ ytick.major.size: 6.0
16
+ # ytick.major.width: 1.5
17
+ ytick.major.pad: 5
18
+ # ytick.minor.size: 4
19
+ ytick.minor.visible: True
20
+ ytick.right: True
21
+
22
+ # Remove legend frame
23
+ legend.frameon: False
24
+
25
+ # Always save as 'tight'
26
+ savefig.bbox: tight
27
+ savefig.pad_inches: 0.05
28
+
29
+ #axes.labelweight : normal
30
+ axes.labelsize: 16
31
+
32
+ grid.alpha: 0.2
33
+
34
+ # tex
35
+ text.usetex: False
36
+
37
+ # fonts
38
+ font.weight: 500
39
+ font.size: 16
40
+
41
+ font.serif: AVHershey Complex
42
+ font.sans-serif: AVHershey Duplex
43
+ font.monospace: AVHershey Complex
44
+
45
+ font.family: serif
46
+
47
+ mathtext.fontset: custom
48
+ mathtext.default: it
49
+ mathtext.rm: AVHershey Complex:medium
50
+ mathtext.it: AVHershey Complex:medium:italic
51
+ mathtext.bf: AVHershey Complex:heavy
52
+ mathtext.sf: AVHershey Duplex:medium
53
+ mathtext.tt: AVHershey Complex:light
54
+
55
+ mathtext.fallback: None
56
+
57
+ axes.formatter.use_mathtext: True
58
+
59
+ ps.fonttype: 42
60
+ pdf.fonttype: 42
61
+
62
+ figure.facecolor: 0d1117
63
+ axes.facecolor: none
64
+ axes.edgecolor: white
65
+ axes.labelcolor: white
66
+ xtick.color: white
67
+ ytick.color: white
68
+ patch.edgecolor: white
69
+ text.color: white
@@ -0,0 +1,60 @@
1
+ axes.prop_cycle: cycler("color", ["000000", "AA0000", "0000AA", "00AA00", "AA00AA", "00AAAA", "AA5500", "AAAAAA"])
2
+ figure.dpi: 150
3
+
4
+ # Set x axis
5
+ xtick.direction: in
6
+ xtick.major.size: 6.0
7
+ # xtick.major.width: 1.5
8
+ xtick.major.pad: 5
9
+ xtick.minor.size: 4
10
+ xtick.minor.visible: True
11
+ xtick.top: True
12
+
13
+ # Set y axis
14
+ ytick.direction: in
15
+ ytick.major.size: 6.0
16
+ # ytick.major.width: 1.5
17
+ ytick.major.pad: 5
18
+ # ytick.minor.size: 4
19
+ ytick.minor.visible: True
20
+ ytick.right: True
21
+
22
+ # Remove legend frame
23
+ legend.frameon: False
24
+
25
+ # Always save as 'tight'
26
+ savefig.bbox: tight
27
+ savefig.pad_inches: 0.05
28
+
29
+ #axes.labelweight : normal
30
+ axes.labelsize: 14
31
+
32
+ grid.alpha: 0.2
33
+
34
+ # tex
35
+ text.usetex: False
36
+
37
+ # fonts
38
+ font.weight: 500
39
+ font.size: 16
40
+
41
+ font.serif: AVHershey Complex
42
+ font.sans-serif: AVHershey Duplex
43
+ font.monospace: AVHershey Complex
44
+
45
+ font.family: serif
46
+
47
+ mathtext.fontset: custom
48
+ mathtext.default: it
49
+ mathtext.rm: AVHershey Complex:medium
50
+ mathtext.it: AVHershey Complex:medium:italic
51
+ mathtext.bf: AVHershey Complex:heavy
52
+ mathtext.sf: AVHershey Duplex:medium
53
+ mathtext.tt: AVHershey Complex:light
54
+
55
+ mathtext.fallback: None
56
+
57
+ axes.formatter.use_mathtext: True
58
+
59
+ ps.fonttype: 42
60
+ pdf.fonttype: 42
@@ -1,4 +1,6 @@
1
+ axes.prop_cycle: cycler('color', ["8bc6e4","f48a7c","3af899","fccd88","be9ac1","7d8c80","e95d7c","2688e3"])
1
2
  figure.dpi: 150
3
+
2
4
  axes.axisbelow: True
3
5
  axes.grid: False
4
6
  grid.linewidth: 0.2
@@ -6,20 +8,33 @@ xtick.direction: out
6
8
  ytick.direction: out
7
9
  grid.alpha: 0.2
8
10
 
11
+ axes.labelsize: 16
12
+
13
+ # tex
9
14
  text.usetex: True
10
15
  text.latex.preamble: \usepackage{amsmath,bm,xcolor,ebgaramond-maths}
11
16
 
12
- font.family: EB Garamond
17
+ #fonts
18
+ font.size: 14
19
+
20
+ font.serif: EB Garamond
21
+ font.sans-serif: EB Garamond
22
+ font.monospace: EB Garamond
23
+
24
+ font.family: serif
25
+
26
+ # font.family: EB Garamond
13
27
  mathtext.fontset: custom
28
+ mathtext.default: it
14
29
  mathtext.rm: EB Garamond
15
30
  mathtext.it: EB Garamond:italic
16
31
  mathtext.bf: EB Garamond:bold
17
-
18
- axes.prop_cycle: cycler('color', ["8bc6e4","f48a7c","3af899","fccd88","be9ac1","7d8c80","e95d7c","2688e3"])
32
+ mathtext.sf: EB Garamond:medium
33
+ mathtext.tt: EB Garamond:light
19
34
 
20
35
  # dark properties
21
- figure.facecolor: 2a2727
22
- axes.facecolor: 453f3d
36
+ figure.facecolor: 0d1117
37
+ axes.facecolor: none
23
38
  axes.edgecolor: white
24
39
  axes.labelcolor: white
25
40
  xtick.color: white
@@ -1,4 +1,5 @@
1
- figure.dpi: 150
1
+ axes.prop_cycle: cycler('color', ["389ed0","ef5946","06b15c","fab54e","9d67a2","545e56","e22850","0d3b66"])
2
+
2
3
  axes.axisbelow: True
3
4
  axes.grid: False
4
5
  grid.linewidth: 0.2
@@ -6,13 +7,26 @@ xtick.direction: out
6
7
  ytick.direction: out
7
8
  grid.alpha: 0.2
8
9
 
10
+ axes.labelsize: 16
11
+
12
+ # tex
9
13
  text.usetex: True
10
14
  text.latex.preamble: \usepackage{amsmath,bm,xcolor,ebgaramond-maths}
11
15
 
12
- font.family: EB Garamond
16
+ #fonts
17
+ font.size: 14
18
+
19
+ font.serif: EB Garamond
20
+ font.sans-serif: EB Garamond
21
+ font.monospace: EB Garamond
22
+
23
+ font.family: serif
24
+
25
+ # font.family: EB Garamond
13
26
  mathtext.fontset: custom
27
+ mathtext.default: it
14
28
  mathtext.rm: EB Garamond
15
29
  mathtext.it: EB Garamond:italic
16
30
  mathtext.bf: EB Garamond:bold
17
-
18
- axes.prop_cycle: cycler('color', ["389ed0","ef5946","06b15c","fab54e","9d67a2","545e56","e22850","0d3b66"])
31
+ mathtext.sf: EB Garamond:medium
32
+ mathtext.tt: EB Garamond:light
@@ -1,3 +1,5 @@
1
+ axes.prop_cycle: cycler('color', ["8bc6e4","f48a7c","3af899","fccd88","be9ac1","7d8c80","e95d7c","2688e3"])
2
+
1
3
  figure.dpi: 150
2
4
  axes.axisbelow: True
3
5
  axes.grid: False
@@ -8,11 +10,9 @@ grid.alpha: 0.2
8
10
 
9
11
  font.family: monospace
10
12
 
11
- axes.prop_cycle: cycler('color', ["8bc6e4","f48a7c","3af899","fccd88","be9ac1","7d8c80","e95d7c","2688e3"])
12
-
13
13
  # dark properties
14
- figure.facecolor: 2a2727
15
- axes.facecolor: 453f3d
14
+ figure.facecolor: 0d1117
15
+ axes.facecolor: none
16
16
  axes.edgecolor: white
17
17
  axes.labelcolor: white
18
18
  xtick.color: white
@@ -1,3 +1,5 @@
1
+ axes.prop_cycle: cycler('color', ["8bc6e4","f48a7c","3af899","fccd88","be9ac1","7d8c80","e95d7c","2688e3"])
2
+
1
3
  figure.dpi: 150
2
4
  axes.axisbelow: True
3
5
  axes.grid: False
@@ -6,6 +8,4 @@ xtick.direction: out
6
8
  ytick.direction: out
7
9
  grid.alpha: 0.2
8
10
 
9
- font.family: monospace
10
-
11
- axes.prop_cycle: cycler('color', ["389ed0","ef5946","06b15c","fab54e","9d67a2","545e56","e22850","0d3b66"])
11
+ font.family: monospace
@@ -13,6 +13,7 @@ commands to help preview the custom styles (function names are self-descriptive)
13
13
 
14
14
  * testAll
15
15
  """
16
+
16
17
  import myplotlib.plots as myplt
17
18
  import myplotlib
18
19
 
@@ -37,7 +38,7 @@ def testColormaps(ax=None):
37
38
  y1, y2 = (pady * (i + 0.5) + dy * i, pady * (i + 0.5) + dy * (i + 1))
38
39
  ax.imshow(zz, extent=(0, 1, y1, y2), cmap=cm)
39
40
  if matplotlib.rcParams["text.usetex"]:
40
- name = r"$\texttt{{'{}'}}$".format(cm)
41
+ name = r"$\texttt{{`{}'}}$".format(cm)
41
42
  else:
42
43
  name = f"'{cm}'"
43
44
  ax.text(1.04, 0.5 * (y1 + y2), name, va="center", ha="left")
@@ -57,9 +58,9 @@ def testColors(ax=None):
57
58
  th = np.linspace(0, 2 * np.pi, 512)
58
59
  ax.plot(th, 0.1 * np.sin(th) + v_offset, color=c, lw=2)
59
60
  if matplotlib.rcParams["text.usetex"]:
60
- name = r"$\texttt{{'C{}'}}$".format(j)
61
+ name = r"$\texttt{{`C{}'}}$".format(j)
61
62
  else:
62
- name = f"'C{j}'"
63
+ name = f"`C{j}'"
63
64
  ax.annotate(
64
65
  name,
65
66
  (0, v_offset),
@@ -70,7 +71,7 @@ def testColors(ax=None):
70
71
  textcoords="offset points",
71
72
  )
72
73
  if matplotlib.rcParams["text.usetex"]:
73
- name = r"$\texttt{{{}}}$".format(c.replace("#", "\#"))
74
+ name = r"$\texttt{{{}}}$".format(c.replace("#", r"\#"))
74
75
  else:
75
76
  name = f"{c}"
76
77
  ax.annotate(
@@ -110,7 +111,14 @@ def testScatter(ax=None):
110
111
  ylim=(1e-2, None),
111
112
  xlim=(1e-2, None),
112
113
  )
113
- plt.legend(loc="lower left")
114
+ # label top left @ outside
115
+ ax.legend(
116
+ loc="upper left",
117
+ bbox_to_anchor=(0, 1.15),
118
+ borderaxespad=0.0,
119
+ ncol=2,
120
+ frameon=False,
121
+ )
114
122
  ax.set_xlabel(r"some funny number $x^2/y$ [units]")
115
123
  ax.set_ylabel(r"other number $z_{\nu}$ [units]")
116
124
 
@@ -0,0 +1,32 @@
1
+ # `classic.light`
2
+
3
+ ![classic_light](classic_light.png)
4
+
5
+ # `fancy.light`
6
+
7
+ ![fancy_light](fancy_light.png)
8
+
9
+ # `classic.dark`
10
+
11
+ ![classic_dark](classic_dark.png)
12
+
13
+ # `mono.light`
14
+
15
+ ![mono_light](mono_light.png)
16
+
17
+ # `fancy.dark`
18
+
19
+ ![fancy_dark](fancy_dark.png)
20
+
21
+ # `mono.dark`
22
+
23
+ ![mono_dark](mono_dark.png)
24
+
25
+ # `Latex`
26
+
27
+ ![Latex](latex.png)
28
+
29
+ # `Plain`
30
+
31
+ ![Plain](plain.png)
32
+
@@ -14,17 +14,17 @@ if __name__ == "__main__":
14
14
  ]:
15
15
  with plt.style.context(f"{st}.{fl}"):
16
16
  mypltests.testAll()
17
- plt.savefig(f"previews/{st}_{fl}.jpg")
18
- readme += f"# `{st}.{fl}`\n\n![{st}_{fl}]({st}_{fl}.jpg)\n\n"
17
+ plt.savefig(f"previews/{st}_{fl}.png", dpi=300)
18
+ readme += f"# `{st}.{fl}`\n\n![{st}_{fl}]({st}_{fl}.png)\n\n"
19
19
 
20
20
  with plt.style.context("latex"):
21
21
  mypltests.testAll()
22
- plt.savefig(f"previews/latex.jpg")
23
- readme += f"# `Latex`\n\n![Latex](latex.jpg)\n\n"
22
+ plt.savefig(f"previews/latex.png", dpi=300)
23
+ readme += f"# `Latex`\n\n![Latex](latex.png)\n\n"
24
24
 
25
25
  mypltests.testAll()
26
- plt.savefig(f"previews/plain.jpg")
27
- readme += f"# `Plain`\n\n![Plain](plain.jpg)\n\n"
26
+ plt.savefig(f"previews/plain.png", dpi=300)
27
+ readme += f"# `Plain`\n\n![Plain](plain.png)\n\n"
28
28
 
29
29
  with open("previews/README.md", "w") as f:
30
30
  f.write(readme)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "myplotlib"
7
+ dynamic = ["version"]
8
+ dependencies = ["matplotlib>=3.5.0", "numpy", "numba>=0.57.0"]
9
+ requires-python = ">=3.8"
10
+ authors = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
11
+ maintainers = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
12
+ description = "`matplotlib` binder with custom styles and routines for fast plotting"
13
+ readme = "README.md"
14
+ license = { file = "LICENSE" }
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Intended Audience :: Science/Research",
18
+ "Intended Audience :: Education",
19
+ "Topic :: Scientific/Engineering :: Visualization",
20
+ "Framework :: Matplotlib",
21
+ "License :: OSI Approved :: BSD License",
22
+ "Programming Language :: Python :: 3 :: Only",
23
+ "Programming Language :: Python :: 3.8",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ ]
29
+
30
+ [project.urls]
31
+ Repository = "https://github.com/haykh/myplotlib"
32
+
33
+ [tool.hatch.version]
34
+ path = "myplotlib/__init__.py"
35
+
36
+ [tool.setuptools]
37
+ include-package-data = true
38
+
39
+ [tool.setuptools.packages.find]
40
+ where = [
41
+ "myplotlib/assets",
42
+ "myplotlib/assets/fonts",
43
+ "myplotlib/assets/colormaps",
44
+ ]
@@ -0,0 +1,45 @@
1
+ {
2
+ pkgs ? import <nixpkgs> { },
3
+ }:
4
+
5
+ let
6
+ name = "myplotlib";
7
+ in
8
+ pkgs.mkShell ({
9
+ name = "${name}-env";
10
+ nativeBuildInputs = with pkgs; [
11
+ python312
12
+ black
13
+ pyright
14
+ taplo
15
+ vscode-langservers-extracted
16
+ zlib
17
+ llvmPackages_19.libcxxClang
18
+ zsh
19
+ ];
20
+
21
+ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
22
+ pkgs.stdenv.cc.cc
23
+ pkgs.zlib
24
+ ];
25
+
26
+ shellHook = ''
27
+ BLUE='\033[0;34m'
28
+ NC='\033[0m'
29
+ export SHELL=$(which zsh)
30
+ export VENV_DIR="$(pwd)/.venv"
31
+
32
+ if [ ! -d "$VENV_DIR" ]; then
33
+ python3 -m venv "$VENV_DIR"
34
+ source "$VENV_DIR/bin/activate"
35
+ pip install --upgrade pip --quiet
36
+ pip install -e . --quiet
37
+ pip install ipykernel jupyter build --quiet
38
+ else
39
+ source "$VENV_DIR/bin/activate"
40
+ fi
41
+
42
+ echo -e "${name} nix-shell activated: ''\${BLUE}$(which python3)''\${NC}"
43
+ exec $SHELL
44
+ '';
45
+ })
@@ -1,28 +0,0 @@
1
- figure.dpi: 300
2
- xtick.direction: in
3
- ytick.direction: in
4
- grid.alpha: 0.2
5
- lines.linewidth: 0.5
6
- axes.linewidth: 0.45
7
- legend.frameon: False
8
- xtick.major.width: 0.5
9
- ytick.major.width: 0.5
10
- xtick.minor.visible: True
11
- ytick.minor.visible: True
12
-
13
- font.family: HersheyTex_Book
14
- mathtext.fontset: custom
15
- mathtext.rm: HersheyTex_Book
16
- mathtext.it: HersheyTex_Book
17
- mathtext.bf: HersheyTex_Book
18
-
19
- axes.prop_cycle: cycler("color", ["FFFFFF", "FF5555", "5555FF", "55FF55", "FF55FF", "55FFFF", "FFFF55", "AAAAAA"])
20
-
21
- figure.facecolor: black
22
- axes.facecolor: black
23
- axes.edgecolor: white
24
- axes.labelcolor: white
25
- xtick.color: white
26
- ytick.color: white
27
- patch.edgecolor: white
28
- text.color: white
@@ -1,21 +0,0 @@
1
- figure.dpi: 300
2
- xtick.direction: in
3
- ytick.direction: in
4
-
5
- grid.alpha: 0.2
6
- lines.linewidth: 0.5
7
- axes.linewidth: 0.45
8
- legend.frameon: False
9
- xtick.major.width: 0.5
10
- ytick.major.width: 0.5
11
- xtick.minor.visible: True
12
- ytick.minor.visible: True
13
-
14
- font.family: HersheyTex_Book
15
- mathtext.fontset: custom
16
- mathtext.rm: HersheyTex_Book
17
- mathtext.it: HersheyTex_Book
18
- mathtext.bf: HersheyTex_Book
19
-
20
- axes.prop_cycle: cycler("color", ["000000", "AA0000", "0000AA", "00AA00", "AA00AA", "00AAAA", "AA5500", "AAAAAA"])
21
-
@@ -1,32 +0,0 @@
1
- # `mono.dark`
2
-
3
- ![mono_dark](mono_dark.jpg)
4
-
5
- # `mono.light`
6
-
7
- ![mono_light](mono_light.jpg)
8
-
9
- # `hershey.light`
10
-
11
- ![hershey_light](hershey_light.jpg)
12
-
13
- # `hershey.dark`
14
-
15
- ![hershey_dark](hershey_dark.jpg)
16
-
17
- # `fancy.light`
18
-
19
- ![fancy_light](fancy_light.jpg)
20
-
21
- # `fancy.dark`
22
-
23
- ![fancy_dark](fancy_dark.jpg)
24
-
25
- # `Latex`
26
-
27
- ![Latex](latex.jpg)
28
-
29
- # `Plain`
30
-
31
- ![Plain](plain.jpg)
32
-
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,40 +0,0 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "myplotlib"
7
- dynamic = ["version"]
8
- dependencies = ["matplotlib>=3.5.0", "numpy", "numba>=0.57.0"]
9
- requires-python = ">=3.8"
10
- authors = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
11
- maintainers = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
12
- description = "`matplotlib` binder with custom styles and routines for fast plotting"
13
- readme = "README.md"
14
- license = { file = "LICENSE" }
15
- classifiers = [
16
- "Development Status :: 5 - Production/Stable",
17
- "Intended Audience :: Science/Research",
18
- "Intended Audience :: Education",
19
- "Topic :: Scientific/Engineering :: Visualization",
20
- "Framework :: Matplotlib",
21
- "License :: OSI Approved :: BSD License",
22
- "Programming Language :: Python :: 3 :: Only",
23
- "Programming Language :: Python :: 3.8",
24
- "Programming Language :: Python :: 3.9",
25
- "Programming Language :: Python :: 3.10",
26
- "Programming Language :: Python :: 3.11",
27
- "Programming Language :: Python :: 3.12",
28
- ]
29
-
30
- [project.urls]
31
- Repository = "https://github.com/haykh/myplotlib"
32
-
33
- [tool.hatch.version]
34
- path = "myplotlib/__init__.py"
35
-
36
- [tool.setuptools]
37
- include-package-data = true
38
-
39
- [tool.setuptools.packages.find]
40
- where = ["myplotlib/assets", "myplotlib/assets/fonts", "myplotlib/assets/colormaps"]
File without changes
File without changes
File without changes