diff --git a/skyproj/_skyproj.py b/skyproj/_skyproj.py index b26e411..a3a548d 100644 --- a/skyproj/_skyproj.py +++ b/skyproj/_skyproj.py @@ -1,18 +1,15 @@ import warnings -import functools import matplotlib.pyplot as plt import numpy as np import hpgeom as hpg -import mpl_toolkits.axisartist as axisartist -import mpl_toolkits.axisartist.angle_helper as angle_helper from mpl_toolkits.axes_grid1.inset_locator import inset_axes from matplotlib.cm import ScalarMappable from matplotlib.colors import Normalize, LogNorm -from .skycrs import get_crs, PlateCarreeCRS, GnomonicCRS, proj, proj_inverse +from .skycrs import get_crs, GnomonicCRS, proj, proj_inverse from .hpx_utils import healpix_pixels_range, hspmap_to_xy, hpxmap_to_xy, healpix_to_xy, healpix_bin from .utils import wrap_values, _get_boundary_poly_xy, get_autoscale_vmin_vmax diff --git a/skyproj/mpl_utils.py b/skyproj/mpl_utils.py index b632654..57cdcb7 100644 --- a/skyproj/mpl_utils.py +++ b/skyproj/mpl_utils.py @@ -401,9 +401,6 @@ def draw(self, renderer): if not l.strip(): continue - override_ha = False - override_va = False - self._ref_angle = a self.set_x(x) self.set_y(y) @@ -411,12 +408,10 @@ def draw(self, renderer): self.set_ha(ha_default) else: self.set_ha(ha) - override_ha = True if va == "": self.set_va(va_default) else: self.set_va(va) - override_va = True self.set_text(l) # The following code is adapted from LabelBase.draw() diff --git a/skyproj/skyaxes.py b/skyproj/skyaxes.py index 8d4f266..7540fa4 100644 --- a/skyproj/skyaxes.py +++ b/skyproj/skyaxes.py @@ -6,12 +6,10 @@ import matplotlib.axes from pyproj import Geod -from .skycrs import PlateCarreeCRS, proj, proj_inverse +from .skycrs import PlateCarreeCRS from .utils import wrap_values from .skygrid import SkyGridlines, SkyGridHelper -from .mpl_utils import ExtremeFinderWrapped, WrappedFormatterDMS, SkyTickLabels -from matplotlib.transforms import ( - Affine2D, Bbox, IdentityTransform, ScaledTranslation) +from .mpl_utils import SkyTickLabels __all__ = ["SkyAxes"] diff --git a/skyproj/skycrs.py b/skyproj/skycrs.py index 63bb083..6c8f278 100644 --- a/skyproj/skycrs.py +++ b/skyproj/skycrs.py @@ -1,6 +1,5 @@ import math import numpy as np -import functools from pyproj import CRS from pyproj import Transformer diff --git a/skyproj/skygrid.py b/skyproj/skygrid.py index 459b4d1..958b4db 100644 --- a/skyproj/skygrid.py +++ b/skyproj/skygrid.py @@ -1,7 +1,7 @@ import functools import numpy as np import matplotlib.collections -from matplotlib.transforms import Bbox, Transform +from matplotlib.transforms import Bbox from .skycrs import proj, proj_inverse from .mpl_utils import ExtremeFinderWrapped, WrappedFormatterDMS @@ -289,15 +289,15 @@ def get_grid_info(self, x1, y1, x2, y2): if np.min(lat_values) < -89.0 and np.max(lat_values) > 89.0: use_equatorial_labels = True - inverted = False + # inverted = False if x1 < x2: - gi_side_map = {side: side for side in ['left', 'right']} + # gi_side_map = {side: side for side in ['left', 'right']} min_x = x1 max_x = x2 else: - gi_side_map = {'left': 'right', - 'right': 'left'} - inverted = True + # gi_side_map = {'left': 'right', + # 'right': 'left'} + # inverted = True min_x = x2 max_x = x1 @@ -306,7 +306,7 @@ def get_grid_info(self, x1, y1, x2, y2): ("lat", lat_levs, lat_factor, lat_values, lat_lines), ]: grid_info[lon_or_lat] = gi = { - "lines": [[l] for l in lines], + "lines": [[line] for line in lines], "ticks": {"left": [], "right": [], "bottom": [], "top": []}, } for (lx, ly), v, level in zip(lines, values, levs):