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

Skip to content

Commit 578dc67

Browse files
efiringMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #14290: Convert SymmetricalLogScale to numpydoc
1 parent ba4b58e commit 578dc67

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

lib/matplotlib/scale.py

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

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

0 commit comments

Comments
 (0)