gypt_matplotlib 0.2.0__tar.gz → 0.2.2__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.0 → gypt_matplotlib-0.2.2}/PKG-INFO +25 -1
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/README.md +24 -0
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/gypt_matplotlib/__init__.py +1 -1
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/pyproject.toml +1 -1
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/LICENSE +0 -0
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/gypt_matplotlib/constants.py +0 -0
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/gypt_matplotlib/context_managers.py +0 -0
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/gypt_matplotlib/gypt.mplstyle +0 -0
- {gypt_matplotlib-0.2.0 → gypt_matplotlib-0.2.2}/gypt_matplotlib/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gypt_matplotlib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
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
|
|
@@ -114,3 +114,27 @@ with gypt.auto_save_and_show("path/to/file.png"):
|
|
|
114
114
|
...
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
#### Using ``utils``
|
|
118
|
+
This library offers multiple utilities which can be used.
|
|
119
|
+
The following utils are included:
|
|
120
|
+
- [``axes_label``](#axes_label)
|
|
121
|
+
- [``tex``](#tex)
|
|
122
|
+
|
|
123
|
+
##### ``axes_label``
|
|
124
|
+
```python
|
|
125
|
+
import gypt_matplotlib as gypt
|
|
126
|
+
|
|
127
|
+
# with a unit
|
|
128
|
+
print(gypt.axes_label("v", unit=r"\frac{m}{s}")) # $v$ in $\frac{m}{s}$
|
|
129
|
+
|
|
130
|
+
# with arbitrary unit
|
|
131
|
+
print(gypt.axes_label("I", is_au=True)) # $I$ in $\text{a.u.}$
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
##### ``tex``
|
|
135
|
+
```python
|
|
136
|
+
import gypt_matplotlib as gypt
|
|
137
|
+
|
|
138
|
+
print(gypt.tex(r"e^{i\pi}+1=0")) # $e^{i\pi}+1=0$
|
|
139
|
+
```
|
|
140
|
+
|
|
@@ -82,3 +82,27 @@ with gypt.auto_save_and_show("path/to/file.png"):
|
|
|
82
82
|
# This context manager automatically calls ``plt.savefig()``, ``plt.show()`` and ``plt.close()``.
|
|
83
83
|
...
|
|
84
84
|
```
|
|
85
|
+
|
|
86
|
+
#### Using ``utils``
|
|
87
|
+
This library offers multiple utilities which can be used.
|
|
88
|
+
The following utils are included:
|
|
89
|
+
- [``axes_label``](#axes_label)
|
|
90
|
+
- [``tex``](#tex)
|
|
91
|
+
|
|
92
|
+
##### ``axes_label``
|
|
93
|
+
```python
|
|
94
|
+
import gypt_matplotlib as gypt
|
|
95
|
+
|
|
96
|
+
# with a unit
|
|
97
|
+
print(gypt.axes_label("v", unit=r"\frac{m}{s}")) # $v$ in $\frac{m}{s}$
|
|
98
|
+
|
|
99
|
+
# with arbitrary unit
|
|
100
|
+
print(gypt.axes_label("I", is_au=True)) # $I$ in $\text{a.u.}$
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
##### ``tex``
|
|
104
|
+
```python
|
|
105
|
+
import gypt_matplotlib as gypt
|
|
106
|
+
|
|
107
|
+
print(gypt.tex(r"e^{i\pi}+1=0")) # $e^{i\pi}+1=0$
|
|
108
|
+
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|