matplotlib-map-utils 3.1.2__py3-none-any.whl → 4.1.0__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.
- matplotlib_map_utils/__init__.py +16 -4
- matplotlib_map_utils/config.py +4 -0
- matplotlib_map_utils/core/inset_map.py +192 -238
- matplotlib_map_utils/core/north_arrow.py +99 -136
- matplotlib_map_utils/core/scale_bar.py +116 -187
- matplotlib_map_utils/defaults/__init__.py +3 -3
- matplotlib_map_utils/defaults/inset_map.py +5 -5
- matplotlib_map_utils/defaults/north_arrow.py +98 -310
- matplotlib_map_utils/defaults/scale_bar.py +92 -343
- matplotlib_map_utils/validation/inset_map.py +54 -71
- matplotlib_map_utils/validation/north_arrow.py +161 -160
- matplotlib_map_utils/validation/scale_bar.py +172 -220
- matplotlib_map_utils/validation/shared.py +66 -0
- matplotlib_map_utils-4.1.0.dist-info/METADATA +108 -0
- matplotlib_map_utils-4.1.0.dist-info/RECORD +25 -0
- {matplotlib_map_utils-3.1.2.dist-info → matplotlib_map_utils-4.1.0.dist-info}/WHEEL +1 -1
- matplotlib_map_utils/validation/functions.py +0 -264
- matplotlib_map_utils-3.1.2.dist-info/METADATA +0 -485
- matplotlib_map_utils-3.1.2.dist-info/RECORD +0 -24
- {matplotlib_map_utils-3.1.2.dist-info → matplotlib_map_utils-4.1.0.dist-info}/licenses/LICENSE +0 -0
- {matplotlib_map_utils-3.1.2.dist-info → matplotlib_map_utils-4.1.0.dist-info}/top_level.txt +0 -0
matplotlib_map_utils/__init__.py
CHANGED
|
@@ -10,12 +10,24 @@ __all__ = ["NorthArrow", "north_arrow",
|
|
|
10
10
|
"InsetMap","inset_map", "ExtentIndicator","indicate_extent", "DetailIndicator","indicate_detail", "inset_usa",
|
|
11
11
|
"set_size"]
|
|
12
12
|
|
|
13
|
+
from . import config
|
|
14
|
+
|
|
13
15
|
def set_size(size: Literal["xs","xsmall","x-small",
|
|
14
16
|
"sm","small",
|
|
15
17
|
"md","medium",
|
|
16
18
|
"lg","large",
|
|
17
19
|
"xl","xlarge","x-large"]):
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
|
|
21
|
+
# standardize the size string
|
|
22
|
+
size_map = {
|
|
23
|
+
"xs": "xs", "xsmall": "xs", "x-small": "xs",
|
|
24
|
+
"sm": "sm", "small": "sm",
|
|
25
|
+
"md": "md", "medium": "md",
|
|
26
|
+
"lg": "lg", "large": "lg",
|
|
27
|
+
"xl": "xl", "xlarge": "xl", "x-large": "xl"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if size.lower() not in size_map:
|
|
31
|
+
raise ValueError("Invalid value supplied, try one of ['xsmall', 'small', 'medium', 'large', 'xlarge']")
|
|
32
|
+
|
|
33
|
+
config.DEFAULT_SIZE = size_map[size.lower()]
|