8000 Various cleanups. by anntzer · Pull Request #12050 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Various cleanups. #12050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2262,15 +2262,14 @@ def margins(self, *margins, x=None, y=None, tight=True):
arguments, but can be used individually to alter on e.g.,
only the y-axis.

tight : bool, default is True
tight : bool or None, default is True
The *tight* parameter is passed to :meth:`autoscale_view`,
which is executed after a margin is changed; the default
here is *True*, on the assumption that when margins are
specified, no additional padding to match tick marks is
usually desired. Set *tight* to *None* will preserve
the previous setting.


Returns
-------
xmargin, ymargin : float
Expand All @@ -2282,7 +2281,6 @@ def margins(self, *margins, x=None, y=None, tight=True 10000 ):
the "sticky artists" will be modified. To force all of the
margins to be set, set :attr:`use_sticky_edges` to `False`
before calling :meth:`margins`.

"""

if margins and x is not None and y is not None:
Expand Down
2 changes: 0 additions & 2 deletions lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def enable(self, event=None):

`trigger` calls this method when `toggled` is False
"""

pass

def disable(self, event=None):
Expand All @@ -206,7 +205,6 @@ def disable(self, event=None):
* Another `ToolToggleBase` derived tool is triggered
(from the same `ToolManager`)
"""

pass

@property
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
path_out = Path(concat([verts_right, path.vertices[i:]]),
concat([codes_right, path.codes[i:]]))

if reorder_inout and begin_inside is False:
if reorder_inout and not begin_inside:
path_in, path_out = path_out, path_in

return path_in, path_out
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def recache(self, always=False):
self.axes.name == 'rectilinear' and
self.axes.get_xscale() == 'linear' and
self._markevery is None and
self.get_clip_on() is True):
self.get_clip_on()):
self._subslice = True
nanmask = np.isnan(x)
if nanmask.any():
Expand Down
16 changes: 10 additions & 6 deletions lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@
# FONTS

def get_unicode_index(symbol, math=True):
"""get_unicode_index(symbol, [bool]) -> integer
r"""
67C7 Return the integer index (from the Unicode table) of *symbol*.

Return the integer index (from the Unicode table) of symbol. *symbol*
can be a single unicode character, a TeX command (i.e. r'\\pi'), or a
Type1 symbol name (i.e. 'phi').
If math is False, the current symbol should be treated as a non-math symbol.
"""
Parameters
----------
symbol : str
A single unicode character, a TeX command (e.g. r'\pi') or a Type1
symbol name (e.g. 'phi').
math : bool, default is True
If False, always treat as a single unicode character.
"""
# for a non-math symbol, simply return its unicode index
if not math:
return ord(symbol)
Expand Down
0