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

Commit0f76a2d

Browse files
committed
FIX : fix order of operation in __init__ functions
1 parentba6b3a3 commit0f76a2d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class Artist(object):
8686
zorder=0
8787

8888
def__init__(self):
89+
self._stale=True
8990
self._axes=None
9091
self.figure=None
9192

@@ -118,7 +119,6 @@ def __init__(self):
118119
self._snap=None
119120
self._sketch=rcParams['path.sketch']
120121
self._path_effects=rcParams['path.effects']
121-
self._stale=True
122122

123123
def__getstate__(self):
124124
d=self.__dict__.copy()

‎lib/matplotlib/collections.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,6 @@ def __init__(self, segments, # Can be None.
10821082
linewidths= (mpl.rcParams['lines.linewidth'],)
10831083
ifantialiasedsisNone:
10841084
antialiaseds= (mpl.rcParams['lines.antialiased'],)
1085-
self.set_linestyles(linestyles)
10861085

10871086
colors=mcolors.colorConverter.to_rgba_array(colors)
10881087

@@ -1101,6 +1100,8 @@ def __init__(self, segments, # Can be None.
11011100
zorder=zorder,
11021101
**kwargs)
11031102

1103+
self.set_linestyles(linestyles)
1104+
11041105
self.set_segments(segments)
11051106

11061107
defset_segments(self,segments):

‎lib/matplotlib/patches.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,8 @@ def __init__(self, xy, radius=5, **kwargs):
14181418
%(Patch)s
14191419
14201420
"""
1421-
self.radius=radius
14221421
Ellipse.__init__(self,xy,radius*2,radius*2,**kwargs)
1422+
self.radius=radius
14231423

14241424
defset_radius(self,radius):
14251425
"""
@@ -3976,6 +3976,7 @@ def __init__(self, posA=None, posB=None,
39763976
Valid kwargs are:
39773977
%(Patch)s
39783978
"""
3979+
Patch.__init__(self,**kwargs)
39793980

39803981
ifposAisnotNoneandposBisnotNoneandpathisNone:
39813982
self._posA_posB= [posA,posB]
@@ -3995,8 +3996,6 @@ def __init__(self, posA=None, posB=None,
39953996
self.shrinkA=shrinkA
39963997
self.shrinkB=shrinkB
39973998

3998-
Patch.__init__(self,**kwargs)
3999-
40003999
self._path_original=path
40014000

40024001
self.set_arrowstyle(arrowstyle)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp