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

Appearance settings

Commit b9b1503

Browse filesBrowse files
committed
Convert SymmetricalLogScale to numpydoc
1 parent 9f3d9d6 commit b9b1503
Copy full SHA for b9b1503

File tree

Expand file treeCollapse file tree

1 file changed

+22
-26
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+22
-26
lines changed

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
+22-26Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -544,39 +544,35 @@ class SymmetricalLogScale(ScaleBase):
544544
need to have a range around zero that is linear. The parameter
545545
*linthresh* allows the user to specify the size of this range
546546
(-*linthresh*, *linthresh*).
547+
548+
Parameters
549+
----------
550+
basex, basey : float
551+
The base of the logarithm. Defualts to 10.
552+
553+
linthreshx, linthreshy : float
554+
Defines the range ``(-x, x)``, within which the plot is linear.
555+
This avoids having the plot go to infinity around zero. Defaults to 2.
556+
557+
subsx, subsy : sequence of int
558+
Where to place the subticks between each major tick.
559+
For example, in a log10 scale: ``[2, 3, 4, 5, 6, 7, 8, 9]`` will place
560+
8 logarithmically spaced minor ticks between each major tick.
561+
562+
linscalex, linscaley : float, optional
563+
This allows the linear range ``(-linthresh, linthresh)`` to be
564+
stretched relative to the logarithmic range. Its value is the number of
565+
decades to use for each half of the linear range. For example, when
566+
*linscale* == 1.0 (the default), the space used for the positive and
567+
negative halves of the linear range will be equal to one decade in
568+
the logarithmic range.
547569
"""
548570
name = 'symlog'
549571
# compatibility shim
550572
SymmetricalLogTransform = SymmetricalLogTransform
551573
InvertedSymmetricalLogTransform = InvertedSymmetricalLogTransform
552574

553575
def __init__(self, axis, **kwargs):
554-
"""
555-
*basex*/*basey*:
556-
The base of the logarithm
557-
558-
*linthreshx*/*linthreshy*:
559-
A single float which defines the range (-*x*, *x*), within
560-
which the plot is linear. This avoids having the plot go to
561-
infinity around zero.
562-
563-
*subsx*/*subsy*:
564-
Where to place the subticks between each major tick.
565-
Should be a sequence of integers. For example, in a log10
566-
scale: ``[2, 3, 4, 5, 6, 7, 8, 9]``
567-
568-
will place 8 logarithmically spaced minor ticks between
569-
each major tick.
570-
571-
*linscalex*/*linscaley*:
572-
This allows the linear range (-*linthresh* to *linthresh*)
573-
to be stretched relative to the logarithmic range. Its
574-
value is the number of decades to use for each half of the
575-
linear range. For example, when *linscale* == 1.0 (the
576-
default), the space used for the positive and negative
577-
halves of the linear range will be equal to one decade in
578-
the logarithmic range.
579-
"""
580576
if axis.axis_name == 'x':
581577
base = kwargs.pop('basex', 10.0)
582578
linthresh = kwargs.pop('linthreshx', 2.0)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.