def _set_lim_and_transforms(self): """Setup the key transforms for the axes.""" # Most of the transforms are set up correctly by LambertAxes LambertAxes._set_lim_and_transforms(self) # Transform for latitude ticks. These are typically unused, but just # in case we need them... yaxis_stretch = Affine2D().scale(4 * self.horizon, 1.0) yaxis_stretch = yaxis_stretch.translate(-self.horizon, 0.0) # These are identical to LambertAxes._set_lim_and_transforms, but we # need to update things to reflect the new "yaxis_stretch" yaxis_space = Affine2D().scale(1.0, 1.1) self._yaxis_transform = \ yaxis_stretch + \ self.transData yaxis_text_base = \ yaxis_stretch + \ self.transProjection + \ (yaxis_space + self.transAffine + self.transAxes) self._yaxis_text1_transform = \ yaxis_text_base + \ Affine2D().translate(-8.0, 0.0) self._yaxis_text2_transform = \ yaxis_text_base + \ Affine2D().translate(8.0, 0.0)
def __init__(self, *args, **kwargs): """Initialization is identical to a normal Axes object except for the following kwarg: Parameters ----------- rotation : number The rotation of the stereonet in degrees clockwise from North. center_latitude : number The center latitude of the stereonet in degrees. center_longitude : number The center longitude of the stereonet in degrees. All additional args and kwargs are identical to Axes.__init__ """ self.horizon = np.radians(90) self._rotation = -np.radians(kwargs.pop('rotation', 0)) y0 = kwargs.get('center_latitude', self._default_center_lat) x0 = kwargs.get('center_longitude', self._default_center_lon) kwargs['center_latitude'] = y0 kwargs['center_longitude'] = x0 self._overlay_axes = None LambertAxes.__init__(self, *args, **kwargs)
def _set_lim_and_transforms(self): """Setup the key transforms for the axes.""" # Most of the transforms are set up correctly by LambertAxes LambertAxes._set_lim_and_transforms(self) # Transform for latitude ticks. These are typically unused, but just # in case we need them... yaxis_stretch = Affine2D().scale(2 * self.horizon, 1.0) yaxis_stretch = yaxis_stretch.translate(-self.horizon, 0.0) # These are identical to LambertAxes._set_lim_and_transforms, but we # need to update things to reflect the new "yaxis_stretch" yaxis_space = Affine2D().scale(1.0, 1.1) self._yaxis_transform = \ yaxis_stretch + \ self.transData yaxis_text_base = \ yaxis_stretch + \ self.transProjection + \ (yaxis_space + \ self.transAffine + \ self.transAxes) self._yaxis_text1_transform = \ yaxis_text_base + \ Affine2D().translate(-8.0, 0.0) self._yaxis_text2_transform = \ yaxis_text_base + \ Affine2D().translate(8.0, 0.0)
def __init__(self, *args, **kwargs): """Initialization is identical to a normal Axes object except for the following kwarg: Parameters ----------- rotation : number The rotation of the stereonet in degrees clockwise from North. All additional args and kwargs are identical to Axes.__init__ """ # There's also center_latitude and center_longitude, but I'm # deliberately keeping these undocumented until they're fully supported. self.horizon = np.radians(90) self._rotation = -np.radians(kwargs.pop('rotation', 0)) LambertAxes.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): """Initialization is identical to a normal Axes object except for the following kwarg: Parameters: ----------- rotation : number The rotation of the stereonet in degrees clockwise from North. All additional args and kwargs are identical to Axes.__init__ """ # There's also center_latitude and center_longitude, but I'm # deliberately keeping these undocumented until they're fully supported. self.horizon = np.radians(90) self._rotation = -np.radians(kwargs.pop('rotation', 0)) LambertAxes.__init__(self, *args, **kwargs)
def set_longitude_grid_ends(self, value): LambertAxes.set_longitude_grid_ends(self, value) if self._overlay_axes is not None: self._overlay_axes.set_longitude_grid_ends(value)
def set_position(self, pos, which='both'): """Identical to Axes.set_position (This docstring is overwritten).""" self._polar.set_position(pos, which) if self._overlay_axes is not None: self._overlay_axes.set_position(pos, which) LambertAxes.set_position(self, pos, which)
def set_position(self, pos, which='both'): """Identical to Axes.set_position (This docstring is overwritten).""" self._polar.set_position(pos, which) LambertAxes.set_position(self, pos, which)