|
1 | 1 | """
|
2 | 2 | Scales define the distribution of data values on an axis, e.g. a log scaling.
|
3 |
| -They are defined as subclasses of `ScaleBase`. |
4 | 3 |
|
5 |
| -See also `.axes.Axes.set_xscale` and the scales examples in the documentation. |
| 4 | +Scales are subclasses `ScaleBase`. Their mapping is implemented through `.Transform` |
| 5 | +subclasses that are separable and have an inverse. |
6 | 6 |
|
7 |
| -See :doc:`/gallery/scales/custom_scale` for a full example of defining a custom |
8 |
| -scale. |
| 7 | +The following scales are builtin: |
| 8 | +
|
| 9 | +============= ===================== ================================ ================================= |
| 10 | +Name Class Transform Inverted transform |
| 11 | +============= ===================== ================================ ================================= |
| 12 | +"asinh" `AsinhScale` `AsinhTransform` `InvertedAsinhTransform` |
| 13 | +"function" `FuncScale` `FuncTransform` `FuncTransform` |
| 14 | +"functionlog" `FuncScaleLog` `FuncTransform` + `LogTransform` `InvertedLogTransform` + `FuncTransform` |
| 15 | +"linear" `LinearScale` `.IdentityTransform` `.IdentityTransform` |
| 16 | +"log" `LogScale` `LogTransform` `InvertedLogTransform` |
| 17 | +"logit" `LogitScale` `LogitTransform` `LogisticTransform` |
| 18 | +"symlog" `SymmetricalLogScale` `SymmetricalLogTransform` `InvertedSymmetricalLogTransform` |
| 19 | +============= ===================== ================================ ================================= |
| 20 | +
|
| 21 | +A user will often only use the scale name, e.g. when setting the scale through |
| 22 | +`~.Axes.set_xscale`: ``ax.set_xscale("log")``. |
| 23 | +
|
| 24 | +See also the :ref:`scales examples <sphx_glr_gallery_scales>` in the documentation. |
| 25 | +
|
| 26 | +Custom scaling can be achieved through `FuncScale`, or by creating your own |
| 27 | +`ScaleBase` subclass (see :doc:`/gallery/scales/custom_scale`). |
| 28 | +Third parties can register their scales by name through `register_scale`. |
9 | 29 |
|
10 | 30 | Matplotlib also supports non-separable transformations that operate on both
|
11 |
| -`~.axis.Axis` at the same time. They are known as projections, and defined in |
| 31 | +`~.axis.Axis` at the same time. They are known as *projections*, and defined in |
12 | 32 | `matplotlib.projections`.
|
13 |
| -""" |
| 33 | +""" # noqa: E501 |
14 | 34 |
|
15 | 35 | import inspect
|
16 | 36 | import textwrap
|
@@ -412,6 +432,8 @@ class SymmetricalLogScale(ScaleBase):
|
412 | 432 | *linthresh* allows the user to specify the size of this range
|
413 | 433 | (-*linthresh*, *linthresh*).
|
414 | 434 |
|
| 435 | + See :doc:`/gallery/scales/symlog_demo` for a detailed description. |
| 436 | +
|
415 | 437 | Parameters
|
416 | 438 | ----------
|
417 | 439 | base : float, default: 10
|
|
0 commit comments