diff --git a/doc/api/scale_api.rst b/doc/api/scale_api.rst index 1eb890dcfb48..623fbdd0392f 100644 --- a/doc/api/scale_api.rst +++ b/doc/api/scale_api.rst @@ -6,3 +6,4 @@ :members: :undoc-members: :show-inheritance: + :member-order: bysource diff --git a/lib/matplotlib/scale.py b/lib/matplotlib/scale.py index ccaaae6caf5d..a63294406b56 100644 --- a/lib/matplotlib/scale.py +++ b/lib/matplotlib/scale.py @@ -1,16 +1,31 @@ """ Scales define the distribution of data values on an axis, e.g. a log scaling. -They are defined as subclasses of `ScaleBase`. -See also `.axes.Axes.set_xscale` and the scales examples in the documentation. +The mapping is implemented through `.Transform` subclasses. -See :doc:`/gallery/scales/custom_scale` for a full example of defining a custom -scale. +The following scales are builtin: -Matplotlib also supports non-separable transformations that operate on both -`~.axis.Axis` at the same time. They are known as projections, and defined in -`matplotlib.projections`. -""" +============= ===================== ================================ ================================= +Name Class Transform Inverted transform +============= ===================== ================================ ================================= +"asinh" `AsinhScale` `AsinhTransform` `InvertedAsinhTransform` +"function" `FuncScale` `FuncTransform` `FuncTransform` +"functionlog" `FuncScaleLog` `FuncTransform` + `LogTransform` `InvertedLogTransform` + `FuncTransform` +"linear" `LinearScale` `.IdentityTransform` `.IdentityTransform` +"log" `LogScale` `LogTransform` `InvertedLogTransform` +"logit" `LogitScale` `LogitTransform` `LogisticTransform` +"symlog" `SymmetricalLogScale` `SymmetricalLogTransform` `InvertedSymmetricalLogTransform` +============= ===================== ================================ ================================= + +A user will often only use the scale name, e.g. when setting the scale through +`~.Axes.set_xscale`: ``ax.set_xscale("log")``. + +See also the :ref:`scales examples ` in the documentation. + +Custom scaling can be achieved through `FuncScale`, or by creating your own +`ScaleBase` subclass and corresponding transforms (see :doc:`/gallery/scales/custom_scale`). +Third parties can register their scales by name through `register_scale`. +""" # noqa: E501 import inspect import textwrap @@ -412,6 +427,8 @@ class SymmetricalLogScale(ScaleBase): *linthresh* allows the user to specify the size of this range (-*linthresh*, *linthresh*). + See :doc:`/gallery/scales/symlog_demo` for a detailed description. + Parameters ---------- base : float, default: 10