gypt_matplotlib 0.2.2__tar.gz → 0.3.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.
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/PKG-INFO +19 -7
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/README.md +18 -6
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/gypt_matplotlib/__init__.py +5 -1
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/gypt_matplotlib/context_managers.py +15 -0
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/pyproject.toml +1 -1
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/LICENSE +0 -0
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/gypt_matplotlib/constants.py +0 -0
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/gypt_matplotlib/gypt.mplstyle +0 -0
- {gypt_matplotlib-0.2.2 → gypt_matplotlib-0.3.0}/gypt_matplotlib/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gypt_matplotlib
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A small addon for matplotlib that can be used for the GYPT.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: Albert Unruh,GYPT,German Young Physicists' Tournament,matplotlib,addon
|
|
@@ -30,19 +30,20 @@ Project-URL: soucecode, https://github.com/AlbertUnruh/gypt-matplotlib
|
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
32
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/blob/develop/LICENSE)
|
|
33
|
-
[](https://python.org)
|
|
34
|
+
[](https://pypi.org/project/gypt_matplotlib/)
|
|
35
|
+
[](https://pepy.tech/project/gypt_matplotlib)
|
|
36
|
+
[](https://github.com/psf/black)
|
|
36
37
|
</br>
|
|
37
|
-
[](https://results.pre-commit.ci/latest/github/AlbertUnruh/gypt-matplotlib/develop)
|
|
38
39
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/actions/workflows/codeql.yml)
|
|
39
|
-
[](https://github.com/AlbertUnruh/gypt-matplotlib/actions/workflows/pytest.yml)
|
|
40
41
|
</br>
|
|
41
42
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/issues)
|
|
42
43
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/pulls)
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
#
|
|
46
|
+
# gypt_matplotlib
|
|
46
47
|
A small addon for matplotlib that can be used for the GYPT.
|
|
47
48
|
|
|
48
49
|
|
|
@@ -54,6 +55,17 @@ GYPT stands for **G**erman **Y**oung **P**hysicists’ **T**ournament.
|
|
|
54
55
|
Further information can be found at [gypt.org][].
|
|
55
56
|
|
|
56
57
|
|
|
58
|
+
### I'm a participant of the GYPT. Can I contribute?
|
|
59
|
+
Of course, you can.
|
|
60
|
+
Even if you are just a former participant, you are welcome.
|
|
61
|
+
In fact, everyone is welcome to contribute or ask for features!
|
|
62
|
+
|
|
63
|
+
Simply open an [issue][] and say what you would like to do so that details can be clarified directly.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
[issue]: https://github.com/AlbertUnruh/gypt-matplotlib/issues
|
|
67
|
+
|
|
68
|
+
|
|
57
69
|
### Where did you get the stylesheet?
|
|
58
70
|
It's available over [here][stylesheet] at the [GYPT wiki][wiki].
|
|
59
71
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/blob/develop/LICENSE)
|
|
2
|
-
[](https://python.org)
|
|
3
|
+
[](https://pypi.org/project/gypt_matplotlib/)
|
|
4
|
+
[](https://pepy.tech/project/gypt_matplotlib)
|
|
5
|
+
[](https://github.com/psf/black)
|
|
5
6
|
</br>
|
|
6
|
-
[](https://results.pre-commit.ci/latest/github/AlbertUnruh/gypt-matplotlib/develop)
|
|
7
8
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/actions/workflows/codeql.yml)
|
|
8
|
-
[](https://github.com/AlbertUnruh/gypt-matplotlib/actions/workflows/pytest.yml)
|
|
9
10
|
</br>
|
|
10
11
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/issues)
|
|
11
12
|
[](https://github.com/AlbertUnruh/gypt-matplotlib/pulls)
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
#
|
|
15
|
+
# gypt_matplotlib
|
|
15
16
|
A small addon for matplotlib that can be used for the GYPT.
|
|
16
17
|
|
|
17
18
|
|
|
@@ -23,6 +24,17 @@ GYPT stands for **G**erman **Y**oung **P**hysicists’ **T**ournament.
|
|
|
23
24
|
Further information can be found at [gypt.org][].
|
|
24
25
|
|
|
25
26
|
|
|
27
|
+
### I'm a participant of the GYPT. Can I contribute?
|
|
28
|
+
Of course, you can.
|
|
29
|
+
Even if you are just a former participant, you are welcome.
|
|
30
|
+
In fact, everyone is welcome to contribute or ask for features!
|
|
31
|
+
|
|
32
|
+
Simply open an [issue][] and say what you would like to do so that details can be clarified directly.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
[issue]: https://github.com/AlbertUnruh/gypt-matplotlib/issues
|
|
36
|
+
|
|
37
|
+
|
|
26
38
|
### Where did you get the stylesheet?
|
|
27
39
|
It's available over [here][stylesheet] at the [GYPT wiki][wiki].
|
|
28
40
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.3.0"
|
|
2
2
|
__description__ = "A small addon for matplotlib that can be used for the GYPT."
|
|
3
3
|
__license__ = "MIT"
|
|
4
4
|
__authors__ = ["Keenan Noack <AlbertUnruh@pm.me>"]
|
|
@@ -6,6 +6,7 @@ __repository__ = "https://github.com/AlbertUnruh/gypt-matplotlib/"
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
# local
|
|
9
|
+
from . import constants, context_managers, utils
|
|
9
10
|
from .context_managers import au_plot, auto_close, auto_save, auto_save_and_show, auto_show
|
|
10
11
|
from .utils import apply_gypt_style, axes_label, tex
|
|
11
12
|
|
|
@@ -17,7 +18,10 @@ __all__ = (
|
|
|
17
18
|
"auto_save_and_show",
|
|
18
19
|
"auto_show",
|
|
19
20
|
"axes_label",
|
|
21
|
+
"constants",
|
|
22
|
+
"context_managers",
|
|
20
23
|
"tex",
|
|
24
|
+
"utils",
|
|
21
25
|
)
|
|
22
26
|
|
|
23
27
|
|
|
@@ -47,6 +47,10 @@ def auto_save(fname: Path | str, **kwargs: ...):
|
|
|
47
47
|
**kwargs
|
|
48
48
|
Will be passed to `plt.savefig()`.
|
|
49
49
|
|
|
50
|
+
Notes
|
|
51
|
+
-----
|
|
52
|
+
This contextmanager automatically applies `plt.tight_layout()` to the plot.
|
|
53
|
+
|
|
50
54
|
Warnings
|
|
51
55
|
--------
|
|
52
56
|
This is incompatible with `auto_show`! Use `auto_save_and_show` instead!
|
|
@@ -57,6 +61,7 @@ def auto_save(fname: Path | str, **kwargs: ...):
|
|
|
57
61
|
"""
|
|
58
62
|
with auto_close():
|
|
59
63
|
yield
|
|
64
|
+
plt.tight_layout()
|
|
60
65
|
plt.savefig(fname, **kwargs)
|
|
61
66
|
|
|
62
67
|
|
|
@@ -65,12 +70,17 @@ def auto_show():
|
|
|
65
70
|
"""
|
|
66
71
|
Contextmanager to automatically show and close plots.
|
|
67
72
|
|
|
73
|
+
Notes
|
|
74
|
+
-----
|
|
75
|
+
This contextmanager automatically applies `plt.tight_layout()` to the plot.
|
|
76
|
+
|
|
68
77
|
Warnings
|
|
69
78
|
--------
|
|
70
79
|
This is incompatible with `auto_save`! Use `auto_save_and_show` instead!
|
|
71
80
|
"""
|
|
72
81
|
with auto_close(): # pragma: no cover # plt.show() won't be tested
|
|
73
82
|
yield
|
|
83
|
+
plt.tight_layout()
|
|
74
84
|
plt.show()
|
|
75
85
|
|
|
76
86
|
|
|
@@ -90,8 +100,13 @@ def auto_save_and_show(fname: Path | str, **kwargs: ...):
|
|
|
90
100
|
----------------
|
|
91
101
|
**kwargs
|
|
92
102
|
Will be passed to `plt.savefig()`.
|
|
103
|
+
|
|
104
|
+
Notes
|
|
105
|
+
-----
|
|
106
|
+
This contextmanager automatically applies `plt.tight_layout()` to the plot.
|
|
93
107
|
"""
|
|
94
108
|
with auto_close(): # pragma: no cover # plt.show() won't be tested
|
|
95
109
|
yield
|
|
110
|
+
plt.tight_layout()
|
|
96
111
|
plt.savefig(fname, **kwargs)
|
|
97
112
|
plt.show()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|