Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitcefae87

Browse files
committed
Placate flake8.
1 parented0a056 commitcefae87

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

‎examples/specialty_plots/skewt.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
# interval as appropriate and see what parts of the tick to draw, if any.
2828
classSkewXTick(maxis.XTick):
2929
defdraw(self,renderer):
30+
# When adding the callbacks with `stack.callback`, we fetch the current
31+
# visibility state of the artist with `get_visible`; the ExitStack will
32+
# restore these states (`set_visible`) at the end of the block (after
33+
# the draw).
3034
withExitStack()asstack:
3135
forartistin [self.gridline,self.tick1line,self.tick2line,
3236
self.label1,self.label2]:

‎lib/matplotlib/axis.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
importnumpyasnp
1010

1111
frommatplotlibimportrcParams
12-
importmatplotlib.artistasartist
12+
importmatplotlib.artistasmartist
1313
importmatplotlib.cbookascbook
1414
frommatplotlib.cbookimport_string_to_bool
1515
importmatplotlib.font_managerasfont_manager
@@ -27,14 +27,14 @@
2727

2828
# This list is being used for compatibility with Axes.grid, which
2929
# allows all Line2D kwargs.
30-
_line_AI=artist.ArtistInspector(mlines.Line2D)
30+
_line_AI=martist.ArtistInspector(mlines.Line2D)
3131
_line_param_names=_line_AI.get_setters()
3232
_line_param_aliases= [list(d)[0]fordin_line_AI.aliasd.values()]
3333
_gridline_param_names= ['grid_'+name
3434
fornamein_line_param_names+_line_param_aliases]
3535

3636

37-
classTick(artist.Artist):
37+
classTick(martist.Artist):
3838
"""
3939
Abstract base class for the axis ticks, grid lines and labels
4040
@@ -81,7 +81,7 @@ def __init__(self, axes, loc, label,
8181
loc is the tick location in data coords
8282
size is the tick size in points
8383
"""
84-
artist.Artist.__init__(self)
84+
martist.Artist.__init__(self)
8585

8686
ifgridOnisNone:
8787
ifmajorand (rcParams['axes.grid.which']in ('both','major')):
@@ -230,11 +230,11 @@ def get_children(self):
230230
returnchildren
231231

232232
defset_clip_path(self,clippath,transform=None):
233-
artist.Artist.set_clip_path(self,clippath,transform)
233+
martist.Artist.set_clip_path(self,clippath,transform)
234234
self.gridline.set_clip_path(clippath,transform)
235235
self.stale=True
236236

237-
set_clip_path.__doc__=artist.Artist.set_clip_path.__doc__
237+
set_clip_path.__doc__=martist.Artist.set_clip_path.__doc__
238238

239239
defget_pad_pixels(self):
240240
returnself.figure.dpi*self._base_pad/72
@@ -289,7 +289,7 @@ def get_loc(self):
289289
'Return the tick location (data coords) as a scalar'
290290
returnself._loc
291291

292-
@artist.allow_rasterization
292+
@martist.allow_rasterization
293293
defdraw(self,renderer):
294294
ifnotself.get_visible():
295295
self.stale=False
@@ -669,7 +669,7 @@ def __get__(self, instance, cls):
669669
returninstance.minorTicks
670670

671671

672-
classAxis(artist.Artist):
672+
classAxis(martist.Artist):
673673
"""
674674
Public attributes
675675
@@ -687,7 +687,7 @@ def __init__(self, axes, pickradius=15):
687687
"""
688688
Init the axis with the parent Axes instance
689689
"""
690-
artist.Artist.__init__(self)
690+
martist.Artist.__init__(self)
691691
self.set_figure(axes.figure)
692692

693693
self.isDefault_label=True
@@ -900,7 +900,7 @@ def _translate_tick_kw(kw):
900900
returnkwtrans
901901

902902
defset_clip_path(self,clippath,transform=None):
903-
artist.Artist.set_clip_path(self,clippath,transform)
903+
martist.Artist.set_clip_path(self,clippath,transform)
904904
forchildinself.majorTicks+self.minorTicks:
905905
child.set_clip_path(clippath,transform)
906906
self.stale=True
@@ -1142,7 +1142,7 @@ def get_tick_padding(self):
11421142
values.append(self.minorTicks[0].get_tick_padding())
11431143
returnmax(values,default=0)
11441144

1145-
@artist.allow_rasterization
1145+
@martist.allow_rasterization
11461146
defdraw(self,renderer,*args,**kwargs):
11471147
'Draw the axis lines, grid lines, tick lines and labels'
11481148

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp