matplotlib-map-utils 3.1.0__py3-none-any.whl → 3.1.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.
@@ -771,7 +771,6 @@ def _config_bar_dim(ax, bar_vertical, bar_projection, bar_unit):
771
771
  units_user = None
772
772
 
773
773
  # Converting
774
-
775
774
  # First, the case where the user doesn't provide any units
776
775
  # In this instance, we just use the units from the projection
777
776
  if units_user is None:
@@ -785,6 +784,9 @@ def _config_bar_dim(ax, bar_vertical, bar_projection, bar_unit):
785
784
  elif units_proj == "ft" and ax_range > (5280*5):
786
785
  ax_units = ax_range / 5280
787
786
  units_label = "mi"
787
+ # Otherwise, if no scaling is necessary...
788
+ else:
789
+ ax_units = ax_range
788
790
 
789
791
  # Otherwise, if the user supplied a unit of some sort, then handle conversion
790
792
  else:
@@ -793,6 +795,9 @@ def _config_bar_dim(ax, bar_vertical, bar_projection, bar_unit):
793
795
  if units_user != units_proj:
794
796
  # This works by finding the ratios between the two units, using meters as the base
795
797
  ax_units = ax_range * (sbt.convert_dict[units_proj] / sbt.convert_dict[units_user])
798
+ # Otherwise, if the units are the same
799
+ else:
800
+ ax_units = ax_range
796
801
 
797
802
  return ax_inches, ax_units, units_label
798
803