8000 Merge pull request #12050 from anntzer/cleanups · matplotlib/matplotlib@6deccc4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6deccc4

Browse files
authored
Merge pull request #12050 from anntzer/cleanups
Various cleanups.
2 parents 21b5b3e + d474a98 commit 6deccc4

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,15 +2262,14 @@ def margins(self, *margins, x=None, y=None, tight=True):
22622262
arguments, but can be used individually to alter on e.g.,
22632263
only the y-axis.
22642264
2265-
tight : bool, default is True
2265+
tight : bool or None, default is True
22662266
The *tight* parameter is passed to :meth:`autoscale_view`,
22672267
which is executed after a margin is changed; the default
22682268
here is *True*, on the assumption that when margins are
22692269
specified, no additional padding to match tick marks is
22702270
usually desired. Set *tight* to *None* will preserve
22712271
the previous setting.
22722272
2273-
22742273
Returns
22752274
-------
22762275
xmargin, ymargin : float
@@ -2282,7 +2281,6 @@ def margins(self, *margins, x=None, y=None, tight=True):
22822281
the "sticky artists" will be modified. To force all of the
22832282
margins to be set, set :attr:`use_sticky_edges` to `False`
22842283
before calling :meth:`margins`.
2285-
22862284
"""
22872285

22882286
if margins and x is not None and y is not None:

lib/matplotlib/backend_tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ def enable(self, event=None):
190190
191191
`trigger` calls this method when `toggled` is False
192192
"""
193-
194193
pass
195194

196195
def disable(self, event=None):
@@ -206,7 +205,6 @@ def disable(self, event=None):
206205
* Another `ToolToggleBase` derived tool is triggered
207206
(from the same `ToolManager`)
208207
"""
209-
210208
pass
211209

212210
@property

lib/matplotlib/lines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def recache(self, always=False):
683683
self.axes.name == 'rectilinear' and
684684
self.axes.get_xscale() == 'linear' and
685685
self._markevery is None and
686-
self.get_clip_on() is True):
686+
self.get_clip_on()):
687687
self._subslice = True
688688
nanmask = np.isnan(x)
689689
if nanmask.any():

lib/matplotlib/mathtext.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@
4545
# FONTS
4646

4747
def get_unicode_index(symbol, math=True):
48-
"""get_unicode_index(symbol, [bool]) -> integer
48+
r"""
49+
Return the integer index (from the Unicode table) of *symbol*.
4950
50-
Return the integer index (from the Unicode table) of symbol. *symbol*
51-
can be a single unicode character, a TeX command (i.e. r'\\pi'), or a
52-
Type1 symbol name (i.e. 'phi').
53-
If math is False, the current symbol should be treated as a non-math symbol.
54-
"""
51+
Parameters
52+
----------
53+
symbol : str
54+
A single unicode character, a TeX command (e.g. r'\pi') or a Type1
55+
symbol name (e.g. 'phi').
56+
math : bool, default is True
57+
If False, always treat as a single unicode character.
58+
"""
5559
# for a non-math symbol, simply return its unicode index
5660
if not math:
5761
return ord(symbol)

0 commit comments

Comments
 (0)
0