matplotlib-map-utils 2.0.2__py3-none-any.whl → 3.0.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.
@@ -15,14 +15,10 @@ import numpy
15
15
  import cartopy
16
16
  import pyproj
17
17
  # Graphical packages
18
- import matplotlib
19
18
  import matplotlib.artist
20
- import matplotlib.pyplot
21
19
  import matplotlib.patches
22
20
  import matplotlib.patheffects
23
21
  import matplotlib.offsetbox
24
- # matplotlib's useful validation functions
25
- import matplotlib.rcsetup
26
22
  # The types we use in this script
27
23
  from typing import Literal
28
24
  # The information contained in our helper scripts (validation and defaults)
@@ -9,27 +9,21 @@
9
9
  import warnings
10
10
  import math
11
11
  import copy
12
- import re
13
12
  # Math packages
14
13
  import numpy
15
14
  # Geo packages
16
- import cartopy
17
15
  import pyproj
18
16
  from great_circle_calculator.great_circle_calculator import distance_between_points
19
17
  # Graphical packages
20
18
  import PIL.Image
21
- import matplotlib
22
19
  import matplotlib.artist
23
20
  import matplotlib.lines
24
21
  import matplotlib.pyplot
25
22
  import matplotlib.patches
26
23
  import matplotlib.patheffects
27
24
  import matplotlib.offsetbox
28
- import matplotlib.transforms
29
25
  import matplotlib.font_manager
30
26
  from matplotlib.backends.backend_agg import FigureCanvasAgg
31
- # matplotlib's useful validation functions
32
- import matplotlib.rcsetup
33
27
  # The types we use in this script
34
28
  from typing import Literal
35
29
  # The information contained in our helper scripts (validation and defaults)
@@ -0,0 +1,67 @@
1
+ #################################################################
2
+ # defaults/inset_map.py contains default values for the InsetMaps
3
+ # at difference plot sizes (xsmall to xlarge)
4
+ # see their corresponding sizes under each default heading
5
+ #################################################################
6
+
7
+ # The main variables that update are the following:
8
+ # inset map: size, pad
9
+ # labels: sep, style
10
+ # units: sep
11
+ # text: fontsize, stroke_width (also changes labels and units)
12
+ # aob: pad, borderpad
13
+
14
+ ## X-SMALL DEFAULTS
15
+ # Should work well for ~A8ish paper (2 to 3 inches, or 5 to 8 cm)
16
+
17
+ # Map
18
+ _INSET_MAP_XS = {
19
+ "size":0.5,
20
+ "pad":0.05,
21
+ }
22
+
23
+ ## SMALL DEFAULTS
24
+ # Should work well for ~A6 paper (4 to 6 inches, or 11 to 15 cm)
25
+
26
+ # Map
27
+ _INSET_MAP_SM = {
28
+ "size":1,
29
+ "pad":0.1,
30
+ }
31
+
32
+ ## MEDIUM DEFAULTS
33
+ # Should work well for ~A4/Letter paper (8 to 12 inches, or 21 to 30 cm)
34
+
35
+ # Map
36
+ _INSET_MAP_MD = {
37
+ "size":2,
38
+ "pad":0.25,
39
+ }
40
+
41
+ ## LARGE DEFAULTS
42
+ # Should work well for ~A2 paper (16 to 24 inches, or 42 to 60 cm)
43
+
44
+ # Map
45
+ _INSET_MAP_LG = {
46
+ "size":4,
47
+ "pad":0.5,
48
+ }
49
+
50
+ ## X-LARGE DEFAULTS
51
+ # Should work well for ~A0/Poster paper (33 to 47 inches, or 85 to 120 cm)
52
+
53
+ # Map
54
+ _INSET_MAP_XL = {
55
+ "size":8,
56
+ "pad":1,
57
+ }
58
+
59
+ ## CONTAINER
60
+ # This makes an easy-to-call dictionary of all the defaults we've set, for easy unpacking by the set_size function
61
+ _DEFAULTS_IM = {
62
+ "xs":[_INSET_MAP_XS],
63
+ "sm":[_INSET_MAP_SM],
64
+ "md":[_INSET_MAP_MD],
65
+ "lg":[_INSET_MAP_LG],
66
+ "xl":[_INSET_MAP_XL],
67
+ }
@@ -0,0 +1,3 @@
1
+ from .usa import USA
2
+
3
+ __all__ = ["USA"]