elisa.plot.scale#
- class LinLogTransform(base: float, lin_thresh: float, lin_scale: float)[source]#
Bases:
TransformAttributes
depthReturn the number of transforms which have been chained together to form this Transform instance.
Methods
contains_branch(other)Return whether the given transform is a sub-tree of this transform.
contains_branch_seperately(other_transform)Return whether the given branch is a sub-tree of this transform on each separate dimension.
frozen()Return a frozen copy of this transform node.
get_affine()Get the affine part of this transform.
get_matrix()Get the matrix for the affine part of this transform.
invalidate()Invalidate this TransformNode and triggers an invalidation of its ancestors.
inverted()Return the corresponding inverse transformation.
set_children(*children)Set the children of the transform, to let the invalidation system know which transforms can invalidate this transform.
transform(values)Apply this transformation on the given array of values.
transform_affine(values)Apply only the affine part of this transformation on the given array of values.
transform_angles(angles, pts[, radians, pushoff])Transform a set of angles anchored at specific locations.
transform_bbox(bbox)Transform the given bounding box.
transform_non_affine(values)Apply only the non-affine part of this transformation.
transform_path(path)Apply the transform to .Path path, returning a new .Path.
transform_path_affine(path)Apply the affine part of this transform to .Path path, returning a new .Path.
transform_path_non_affine(path)Apply the non-affine part of this transform to .Path path, returning a new .Path.
transform_point(point)Return a transformed point.
- input_dims = 1#
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
- output_dims = 1#
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
- transform_non_affine(values: ndarray)[source]#
Apply only the non-affine part of this transformation.
transform(values)is always equivalent totransform_affine(transform_non_affine(values)).In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is always a no-op.- Parameters:
- values
array The input values as an array of length
input_dimsor shape (N,input_dims).
- values
- Returns:
arrayThe output values as an array of length
output_dimsor shape (N,output_dims), depending on the input.
- inverted()[source]#
Return the corresponding inverse transformation.
It holds
x == self.inverted().transform(self.transform(x)).The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
- has_inverse = True#
True if this transform has a corresponding inverse transform.
- is_separable = True#
True if this transform is separable in the x- and y- dimensions.
- class InvertedLinLogTransform(base: float, lin_thresh: float, lin_scale: float)[source]#
Bases:
TransformAttributes
depthReturn the number of transforms which have been chained together to form this Transform instance.
Methods
contains_branch(other)Return whether the given transform is a sub-tree of this transform.
contains_branch_seperately(other_transform)Return whether the given branch is a sub-tree of this transform on each separate dimension.
frozen()Return a frozen copy of this transform node.
get_affine()Get the affine part of this transform.
get_matrix()Get the matrix for the affine part of this transform.
invalidate()Invalidate this TransformNode and triggers an invalidation of its ancestors.
inverted()Return the corresponding inverse transformation.
set_children(*children)Set the children of the transform, to let the invalidation system know which transforms can invalidate this transform.
transform(values)Apply this transformation on the given array of values.
transform_affine(values)Apply only the affine part of this transformation on the given array of values.
transform_angles(angles, pts[, radians, pushoff])Transform a set of angles anchored at specific locations.
transform_bbox(bbox)Transform the given bounding box.
transform_non_affine(values)Apply only the non-affine part of this transformation.
transform_path(path)Apply the transform to .Path path, returning a new .Path.
transform_path_affine(path)Apply the affine part of this transform to .Path path, returning a new .Path.
transform_path_non_affine(path)Apply the non-affine part of this transform to .Path path, returning a new .Path.
transform_point(point)Return a transformed point.
- input_dims = 1#
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
- output_dims = 1#
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
- transform_non_affine(values: ndarray)[source]#
Apply only the non-affine part of this transformation.
transform(values)is always equivalent totransform_affine(transform_non_affine(values)).In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is always a no-op.- Parameters:
- values
array The input values as an array of length
input_dimsor shape (N,input_dims).
- values
- Returns:
arrayThe output values as an array of length
output_dimsor shape (N,output_dims), depending on the input.
- inverted()[source]#
Return the corresponding inverse transformation.
It holds
x == self.inverted().transform(self.transform(x)).The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
- has_inverse = True#
True if this transform has a corresponding inverse transform.
- is_separable = True#
True if this transform is separable in the x- and y- dimensions.
- class LinLogLocator(lin_thresh: float, lin_scale: float, base: float = 10.0, subs=(1.0,), numticks=None, is_minor: bool = False)[source]#
Bases:
LocatorDetermine the tick locations for LinLogScale axes.
Attributes
axis
Methods
__call__()Return the locations of the ticks.
nonsingular(v0, v1)Adjust a range as needed to avoid singularities.
raise_if_exceeds(locs)Log at WARNING level if locs is longer than Locator.MAXTICKS.
set_params([base, subs, numticks])Set parameters for log locator.
tick_values(vmin, vmax)Return the values of the located ticks given vmin and vmax.
view_limits(vmin, vmax)Try to choose the view limits intelligently.
create_dummy_axis
set_axis
transform_non_affine
- class LinLogScale(axis, *, base: float = 10.0, lin_thresh: float = 1.0, lin_scale=None, subs=None)[source]#
Bases:
ScaleBaseThe linear-logarithmic scale is logarithmic above positive lin_thresh and linear otherwise.
- Parameters:
- base
float, default: 10 The base of the logarithm.
- lin_thresh
float, default: 1.0 Defines the range
(lin_thresh, +inf), within which the plot is logarithmic.- lin_scale
float, optional This allows the linear range
(-inf, lin_thresh)to be stretched relative to the logarithmic range. Its value is the number of decades to use for the linear range. For example, when lin_scale == 1.0, the space used for[0, lin_thresh]range will be equal to one decade in the logarithmic range.- subssequence
ofint Where to place the subticks between each major tick. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
- base
Attributes
base
lin_scale
lin_thresh
Methods
Return the .LinLogTransform associated with this scale.
limit_range_for_scale(vmin, vmax, minpos)Return the range vmin, vmax, restricted to the domain supported by this scale (if any).
Set the locators and formatters of axis to instances suitable for this scale.
- name = 'linlog'#
- property base#
- property lin_thresh#
- property lin_scale#