matplotlib-map-utils 2.0.1__py3-none-any.whl → 2.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/core/scale_bar.py +3 -3
- matplotlib_map_utils/utils/__init__.py +3 -0
- matplotlib_map_utils/utils/usa.json +1038 -0
- matplotlib_map_utils/utils/usa.py +336 -0
- {matplotlib_map_utils-2.0.1.dist-info → matplotlib_map_utils-2.1.0.dist-info}/METADATA +59 -8
- {matplotlib_map_utils-2.0.1.dist-info → matplotlib_map_utils-2.1.0.dist-info}/RECORD +9 -6
- {matplotlib_map_utils-2.0.1.dist-info → matplotlib_map_utils-2.1.0.dist-info}/WHEEL +1 -1
- {matplotlib_map_utils-2.0.1.dist-info → matplotlib_map_utils-2.1.0.dist-info/licenses}/LICENSE +0 -0
- {matplotlib_map_utils-2.0.1.dist-info → matplotlib_map_utils-2.1.0.dist-info}/top_level.txt +0 -0
@@ -679,7 +679,7 @@ def _config_bar(ax, bar):
|
|
679
679
|
# If the provided units are in degrees, we will convert to meters first
|
680
680
|
# This will recalculate the ax_range
|
681
681
|
if units_proj=="degree":
|
682
|
-
warnings.warn(f"Provided CRS {bar[
|
682
|
+
warnings.warn(f"Provided CRS {bar['projection']} uses degrees. An attempt will be made at conversion, but there will be accuracy issues: it is recommended that you use a projected CRS instead.")
|
683
683
|
ylim = ax.get_ylim()
|
684
684
|
xlim = ax.get_xlim()
|
685
685
|
# Using https://github.com/seangrogan/great_circle_calculator/blob/master/great_circle_calculator/great_circle_calculator.py
|
@@ -706,7 +706,7 @@ def _config_bar(ax, bar):
|
|
706
706
|
try:
|
707
707
|
units_user = sbt.units_standard.get(bar["unit"])
|
708
708
|
except:
|
709
|
-
warnings.warn(f"Desired output units selected by user ({bar[
|
709
|
+
warnings.warn(f"Desired output units selected by user ({bar['unit']}) are considered invalid; please use one of the units specified in the units_standard dictionary in defaults.py")
|
710
710
|
units_user = None
|
711
711
|
|
712
712
|
# Converting
|
@@ -749,7 +749,7 @@ def _config_bar(ax, bar):
|
|
749
749
|
if bar["length"] < ax_dim:
|
750
750
|
bar_max = (bar["length"] / ax_dim) * ax_range
|
751
751
|
else:
|
752
|
-
warnings.warn(f"Provided bar length ({bar[
|
752
|
+
warnings.warn(f"Provided bar length ({bar['length']}) is greater than the axis length ({ax_dim}); setting bar length to default (25% of axis length).")
|
753
753
|
bar_max = 0.25 * ax_range
|
754
754
|
# If bar["max"] is provided, don't need to go through all of this effort
|
755
755
|
else:
|