@@ -440,9 +440,9 @@ def _is_within_latlon_bounds(data, x: str, y: str) -> bool:
440440 return x_ok and y_ok
441441
442442
443- def _convert_latlon_to_mercator (lon : np .ndarray , lat : np .ndarray , lon_180 : bool = True ):
443+ def _convert_latlon_to_mercator (lon : np .ndarray , lat : np .ndarray , use_lon_180 : bool = True ):
444444 """Convert lon/lat values to Web Mercator easting/northing."""
445- if lon_180 :
445+ if use_lon_180 :
446446 # ticks are better displayed with -180 to 180
447447 lon = (lon + 180 ) % 360 - 180
448448 else :
@@ -484,13 +484,13 @@ def _convert_limit_to_mercator(limit: tuple | None, is_x_axis=True) -> tuple | N
484484 if is_x_axis :
485485 if not _bounds_in_range (v0 , v1 , - 180 , 360 ):
486486 return limit
487- lon_180 = (
487+ use_lon_180 = (
488488 (np .isnan (v0 ) or np .isnan (v1 ))
489489 or ((v0 <= 0 or v1 >= 0 ) and (v0 >= 180 or v1 <= 180 ))
490490 or (v1 < v0 and v0 > 180 )
491491 )
492492 (v0_merc , v1_merc ), _ = _convert_latlon_to_mercator (
493- np .array ([v0 , v1 ]), (0 , 0 ), lon_180
493+ np .array ([v0 , v1 ]), (0 , 0 ), use_lon_180
494494 )
495495 else :
496496 if not _bounds_in_range (v0 , v1 , - 90 , 90 ):
0 commit comments