Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c82a2a

Browse files
committed
DOC: Improve module docs of matplotlib.scale
1 parenta18354a commit7c82a2a

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

‎doc/api/scale_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
:members:
77
:undoc-members:
88
:show-inheritance:
9+
:member-order: bysource

‎lib/matplotlib/scale.py

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
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.
66
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`.
929
1030
Matplotlib also supports non-separable transformations that operate on both
1131
`~.axis.Axis` at the same time. They are known as projections, and defined in
1232
`matplotlib.projections`.
13-
"""
33+
"""# noqa: E501
1434

1535
importinspect
1636
importtextwrap
@@ -412,6 +432,8 @@ class SymmetricalLogScale(ScaleBase):
412432
*linthresh* allows the user to specify the size of this range
413433
(-*linthresh*, *linthresh*).
414434
435+
See :doc:`/gallery/scales/symlog_demo` for a detailed description.
436+
415437
Parameters
416438
----------
417439
base : float, default: 10

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp