toolsos 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl
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.
- toolsos/huisstijl/maps/choropleth.py +9 -3
- {toolsos-0.3.0.dist-info → toolsos-0.3.1.dist-info}/METADATA +1 -1
- {toolsos-0.3.0.dist-info → toolsos-0.3.1.dist-info}/RECORD +5 -5
- {toolsos-0.3.0.dist-info → toolsos-0.3.1.dist-info}/WHEEL +1 -1
- {toolsos-0.3.0.dist-info → toolsos-0.3.1.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from typing import Any, Iterable, Optional
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
2
2
|
|
|
3
3
|
import geopandas as gpd
|
|
4
4
|
import matplotlib.pyplot as plt
|
|
5
|
+
from matplotlib import axis
|
|
5
6
|
from matplotlib.colors import ListedColormap
|
|
6
7
|
from matplotlib.patches import Patch
|
|
7
8
|
|
|
@@ -16,9 +17,13 @@ def plot_choropleth(
|
|
|
16
17
|
edgecolor: str = "grey",
|
|
17
18
|
figsize: tuple[int, int] = (10, 8),
|
|
18
19
|
bbox_to_anchor: tuple[int, int] = (-0.05, 0),
|
|
20
|
+
ax: Optional[axis.Axis] = None,
|
|
19
21
|
):
|
|
22
|
+
_ax = ax
|
|
23
|
+
|
|
20
24
|
# plotten
|
|
21
|
-
|
|
25
|
+
if not ax:
|
|
26
|
+
fig, ax = plt.subplots(figsize=figsize)
|
|
22
27
|
|
|
23
28
|
gdf.plot(
|
|
24
29
|
column=column,
|
|
@@ -69,4 +74,5 @@ def plot_choropleth(
|
|
|
69
74
|
# laten zien
|
|
70
75
|
plt.tight_layout()
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
if not _ax:
|
|
78
|
+
return fig, ax
|
|
@@ -16,12 +16,12 @@ toolsos/huisstijl/graphs/linegraph.py,sha256=dMUarRe31SXaY78OCXLy-PgnU8LlVJ9KkzK
|
|
|
16
16
|
toolsos/huisstijl/graphs/piegraph.py,sha256=aEFiEM-9QuhBOjKHSXVuE5bTh-8uucq4FP6O8Vk1vZI,703
|
|
17
17
|
toolsos/huisstijl/graphs/styler.py,sha256=-uZ7pjY1G39XvmaGHQd31gPRxjxmJGhYZk8xhy2JUWc,6623
|
|
18
18
|
toolsos/huisstijl/maps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
toolsos/huisstijl/maps/choropleth.py,sha256=
|
|
19
|
+
toolsos/huisstijl/maps/choropleth.py,sha256=sGNBD1pkfUawekCpXp3YABkipB0zhaBl6OGU5Od88Cg,2037
|
|
20
20
|
toolsos/huisstijl/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
toolsos/huisstijl/tables/table_helpers.py,sha256=jsQ6lw93sxtGJGrUn8X2_LyA2vYYnytngpUI5A_wpWQ,2037
|
|
22
22
|
toolsos/huisstijl/tables/table_styles.py,sha256=oYU6GJcfqlKpZof5PUjPsA7woJ3Tew78CHPyT0_jY6w,1343
|
|
23
23
|
toolsos/huisstijl/tables/tables.py,sha256=yeHiZd4EuOoeb_CeRE74xM1r1j6gCMNM1-I3Lpd2tyQ,24728
|
|
24
|
-
toolsos-0.3.
|
|
25
|
-
toolsos-0.3.
|
|
26
|
-
toolsos-0.3.
|
|
27
|
-
toolsos-0.3.
|
|
24
|
+
toolsos-0.3.1.dist-info/METADATA,sha256=oDwgu8kut4k6znZdgHVHsYOLn6oX6HadovI_bavH_9o,2725
|
|
25
|
+
toolsos-0.3.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
26
|
+
toolsos-0.3.1.dist-info/top_level.txt,sha256=2ClEjUBbtfDQ8oPwvWRy1Sz2nrkLCXlg0mHaMdCWia0,8
|
|
27
|
+
toolsos-0.3.1.dist-info/RECORD,,
|
|
File without changes
|