8000 Document SymmetricalLogLocator parameters. · matplotlib/matplotlib@aba2973 · GitHub
[go: up one dir, main page]

Skip to content

Commit aba2973

Browse files
committed
Document SymmetricalLogLocator parameters.
I didn't want to duplicate all the math explained in SymmetricalLogScale, just to point out the (awkward) interaction between *transform* and *base*/*linthresh*. (Probably one should deprecate *transform* and make the Locator behave more like LogLocator...)
1 parent 58c6698 commit aba2973

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

lib/matplotlib/ticker.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,11 +2499,28 @@ def nonsingular(self, vmin, vmax):
24992499

25002500
class SymmetricalLogLocator(Locator):
25012501
"""
2502-
Determine the tick locations for symmetric log axes
2502+
Determine the tick locations for symmetric log axes.
25032503
"""
25042504

25052505
def __init__(self, transform=None, subs=None, linthresh=None, base=None):
2506-
"""Place ticks on the locations ``base**i*subs[j]``."""
2506+
"""
2507+
Parameters
2508+
----------
2509+
transform : `~.scale.SymmetricalLogTransform`, optional
2510+
If set, defines the *base* and *linthresh* of the symlog transform.
2511+
base, linthresh : float, optional
2512+
The *base* and *linthresh* of the symlog transform, as documented
2513+
for `.SymmetricalLogScale`. These parameters are only used if
2514+
*transform* is not set.
2515+
subs : sequence of float, default: [1]
2516+
The multiples of integer powers of the base where ticks are placed,
2517+
i.e., ticks are placed at
2518+
``[sub * base**i for i in ... for sub in subs]``.
2519+
2520+
Notes
2521+
-----
2522+
Either *transform*, or both *base* and *linthresh*, must be given.
2523+
"""
25072524
if transform is not None:
25082525
self._base = transform.base
25092526
self._linthresh = transform.linthresh

0 commit comments

Comments
 (0)
0