8000 Fix small documentation issues from QuLogic's review · matplotlib/matplotlib@7839ed2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7839ed2

Browse files
committed
Fix small documentation issues from QuLogic's review
1 parent c9922de commit 7839ed2

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
:class:`matplotlib.ticker.EngFormatter` now computes offset by default
2-
----------------------------------------------------------------------
1+
``matplotlib.ticker.EngFormatter`` now computes offset by default
2+
-----------------------------------------------------------------
33

4-
:class:`matplotlib.ticker.EngFormatter` has gained the ability to show an
5-
offset text near the axis. With shared logic with
6-
:class:`matplotlib.ticker.ScalarFormatter`, it is capable of deciding whether
7-
the data qualifies having an offset and show it with an appropriate SI quantity
8-
prefix, and with the supplied ``unit``.
4+
`matplotlib.ticker.EngFormatter` has gained the ability to show an offset text near the
5+
axis. Using logic shared with `matplotlib.ticker.ScalarFormatter`, it is capable of
6+
deciding whether the data qualifies having an offset and show it with an appropriate SI
7+
quantity prefix, and with the supplied ``unit``.
98

109
To enable this new behavior, simply pass ``useOffset=True`` when you
11-
instantiate :class:`matplotlib.ticker.EngFormatter`. See example
10+
instantiate `matplotlib.ticker.EngFormatter`. See example
1211
:doc:`/gallery/ticks/engformatter_offset`.
1312

1413
.. plot:: gallery/ticks/engformatter_offset.py

galleries/examples/ticks/engformatter_offset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SI prefixed offsets and natural order of magnitudes
44
===================================================
55
6-
:class:`matplotlib.ticker.EngFormatter` is capable of computing a natural
6+
`matplotlib.ticker.EngFormatter` is capable of computing a natural
77
offset for your axis data, and presenting it with a standard SI prefix
88
automatically calculated.
99

lib/matplotlib/ticker.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ def __init__(self, unit="", places=None, sep=" ", *, usetex=None,
14151415
guaranteed to get an offset which will make the tick labels exceed
14161416
3 digits. See also `.set_useOffset`.
14171417
1418-
.. versionadded:: 3.10
1418+
.. versionadded:: 3.10
14191419
"""
14201420
self.unit = unit
14211421
self.places = places
@@ -1429,9 +1429,10 @@ def __init__(self, unit="", places=None, sep=" ", *, usetex=None,
14291429

14301430
def __call__(self, x, pos=None):
14311431
"""
1432-
Return the format for tick value *x* at position *pos*. If there is no
1433-
currently offset in the data, it returns the best engineering formatting
1434-
that fits the given argument, independently.
1432+
Return the format for tick value *x* at position *pos*.
1433+
1434+
If there is no currently offset in the data, it returns the best
1435+
engineering formatting that fits the given argument, independently.
14351436
"""
14361437
if len(self.locs) == 0 or self.offset == 0:
14371438
return self.fix_minus(self.format_data(x))

0 commit comments

Comments
 (0)
0