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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gypt_matplotlib
3
- Version: 0.2.0
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
+ ```
@@ -1,4 +1,4 @@
1
- __version__ = "0.2.0"
1
+ __version__ = "0.2.2"
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>"]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gypt_matplotlib"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "A small addon for matplotlib that can be used for the GYPT."
5
5
  authors = [
6
6
  {name = "Keenan Noack", email = "AlbertUnruh@pm.me"}
File without changes