Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 53b7239

Browse filesBrowse files
committed
Style fixes for secondary_axis.
There's a lot of unused imports :)
1 parent b53418e commit 53b7239
Copy full SHA for 53b7239

File tree

Expand file treeCollapse file tree

1 file changed

+5
-25
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-25
lines changed

‎lib/matplotlib/axes/_secondary_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_secondary_axes.py
+5-25Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
import collections
21
import numpy as np
3-
import numbers
4-
5-
import warnings
62

3+
import matplotlib.cbook as cbook
74
import matplotlib.docstring as docstring
85
import matplotlib.ticker as mticker
96
import matplotlib.transforms as mtransforms
10-
import matplotlib.scale as mscale
11-
import matplotlib.cbook as cbook
12-
137
from matplotlib.axes._base import _AxesBase
14-
15-
from matplotlib.ticker import (
16-
AutoLocator,
17-
AutoMinorLocator,
18-
FixedLocator,
19-
FuncFormatter,
20-
LogFormatterSciNotation,
21-
LogLocator,
22-
NullLocator,
23-
NullFormatter,
24-
ScalarFormatter
25-
)
26-
27-
from matplotlib.scale import Log10Transform
8+
from matplotlib.ticker import FixedLocator
289

2910

3011
def _make_secondary_locator(rect, parent):
@@ -254,9 +235,7 @@ def draw(self, renderer=None, inframe=False):
254235
using the converter specified by
255236
`~.axes._secondary_axes.set_functions` (or *functions*
256237
parameter when axes initialized.)
257-
258238
"""
259-
260239
self._set_lims()
261240
# this sets the scale in case the parent has set its scale.
262241
self._set_scale()
@@ -296,7 +275,7 @@ def _set_scale(self):
296275
def _set_lims(self):
297276
"""
298277
Set the limits based on parent limits and the convert method
299-
between the parent and this secondary axes
278+
between the parent and this secondary axes.
300279
"""
301280
if self._orientation == 'x':
302281
lims = self._parent.get_xlim()
@@ -371,7 +350,8 @@ def set_ylabel(self, ylabel, fontdict=None, labelpad=None, **kwargs):
371350

372351
def set_color(self, color):
373352
"""
374-
Change the color of the secondary axes and all decorators
353+
Change the color of the secondary axes and all decorators.
354+
375355
Parameters
376356
----------
377357
color : Matplotlib color

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.