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