Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46e326d

Browse files
committed
DOC: Improve module docs of matplotlib.scale
1 parent a18354a commit 46e326d

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

lib/matplotlib/scale.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
"""
22
Scales define the distribution of data values on an axis, e.g. a log scaling.
3-
They are defined as subclasses of `ScaleBase`.
43
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+
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 scales examples in the documentation.
625
726
See :doc:`/gallery/scales/custom_scale` for a full example of defining a custom
827
scale.
@@ -412,6 +431,8 @@ class SymmetricalLogScale(ScaleBase):
412431
*linthresh* allows the user to specify the size of this range
413432
(-*linthresh*, *linthresh*).
414433
434+
See :doc:`/gallery/scales/symlog_demo` for a detailed description.
435+
415436
Parameters
416437
----------
417438
base : float, default: 10

0 commit comments

Comments
 (0)