Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21ab34f

Browse files
committed
*** empty log message ***
svn path=/trunk/matplotlib/; revision=1525
1 parent f32568f commit 21ab34f

8 files changed

Lines changed: 747 additions & 708 deletions

File tree

lib/matplotlib/artist.py

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,29 @@ def add_callback(self, func):
5252
self._oid += 1
5353
return oid
5454

55-
def remove_callback(self, oid):
55+
def remove_callback(self, oid):
5656
try: del self._propobservers[oid]
5757
except KeyError: pass
5858

5959
def pchanged(self):
6060
'fire event when property changed'
6161
for oid, func in self._propobservers.items():
6262
func(self)
63-
63+
6464
def is_transform_set(self):
65-
'Artist has transform explicity let'
65+
'Artist has transform explicity let'
6666
return self._transformSet
6767

6868
def set_transform(self, t):
6969
"""
70-
set the Transformation instance used by this artist
70+
set the Transformation instance used by this artist
7171
72-
ACCEPTS: a matplotlib.transform transformation instance
73-
"""
72+
ACCEPTS: a matplotlib.transform transformation instance
73+
"""
7474
self._transform = t
7575
self._transformSet = True
7676
self.pchanged()
77-
77+
7878
def get_transform(self):
7979
'return the Transformation instance used by this artist'
8080
return self._transform
@@ -85,36 +85,36 @@ def is_figure_set(self):
8585
def get_figure(self):
8686
'return the figure instance'
8787
return self.figure
88-
88+
8989
def set_figure(self, fig):
9090
"""
91-
Set the figure instance the artist belong to
91+
Set the figure instance the artist belong to
9292
93-
ACCEPTS: a matplotlib.figure.Figure instance
93+
ACCEPTS: a matplotlib.figure.Figure instance
9494
"""
9595
self.figure = fig
9696
self.pchanged()
97-
98-
def set_clip_box(self, clipbox):
97+
98+
def set_clip_box(self, clipbox):
9999
"""
100-
Set the artist's clip Bbox
100+
Set the artist's clip Bbox
101101
102-
ACCEPTS: a matplotlib.transform.Bbox instance
102+
ACCEPTS: a matplotlib.transform.Bbox instance
103103
"""
104104
self.clipbox = clipbox
105105
self._clipon = clipbox is not None
106106
self.pchanged()
107-
107+
108108
def get_alpha(self):
109109
"""
110-
Return the alpha value used for blending - not supported on all
111-
backends
110+
Return the alpha value used for blending - not supported on all
111+
backends
112112
"""
113113
return self._alpha
114-
114+
115115
def get_visible(self):
116116
"return the artist's visiblity"
117-
return self._visible
117+
return self._visible
118118

119119
def get_clip_on(self):
120120
'Return whether artist uses clipping'
@@ -126,44 +126,44 @@ def get_clip_box(self):
126126

127127
def set_clip_on(self, b):
128128
"""
129-
Set whether artist uses clipping
129+
Set whether artist uses clipping
130130
131-
ACCEPTS: [True | False]
132-
"""
131+
ACCEPTS: [True | False]
132+
"""
133133
self._clipon = b
134134
if not b: self.clipbox = None
135135
self.pchanged()
136136
def draw(self, renderer, *args, **kwargs):
137137
'Derived classes drawing method'
138-
if not self.get_visible(): return
138+
if not self.get_visible(): return
139139

140140
def set_alpha(self, alpha):
141141
"""
142-
Set the alpha value used for blending - not supported on
143-
all backends
142+
Set the alpha value used for blending - not supported on
143+
all backends
144144
145-
ACCEPTS: float
145+
ACCEPTS: float
146146
"""
147147
self._alpha = alpha
148148
self.pchanged()
149149

150150
def set_lod(self, on):
151151
"""
152-
Set Level of Detail on or off. If on, the artists may examine
153-
things like the pixel width of the axes and draw a subset of
154-
their contents accordingly
152+
Set Level of Detail on or off. If on, the artists may examine
153+
things like the pixel width of the axes and draw a subset of
154+
their contents accordingly
155155
156-
ACCEPTS: [True | False]
156+
ACCEPTS: [True | False]
157157
"""
158158
self._lod = on
159159
self.pchanged()
160-
160+
161161
def set_visible(self, b):
162162
"""
163-
set the artist's visiblity
163+
set the artist's visiblity
164164
165-
ACCEPTS: [True | False]
166-
"""
165+
ACCEPTS: [True | False]
166+
"""
167167
self._visible = b
168168
self.pchanged()
169169

@@ -179,31 +179,31 @@ def update(self, props):
179179
changed = True
180180
self.eventson = store
181181
if changed: self.pchanged()
182-
182+
183183

184184
def get_label(self):
185185
return self._label
186186

187187
def set_label(self, s):
188188
"""
189-
Set the line label to s for auto legend
189+
Set the line label to s for auto legend
190190
191-
ACCEPTS: any string
192-
"""
191+
ACCEPTS: any string
192+
"""
193193
self._label = s
194194
self.pchanged()
195195

196196
def get_zorder(self): return self.zorder
197197

198198
def set_zorder(self, level):
199199
"""
200-
Set the zorder for the artist
200+
Set the zorder for the artist
201201
202-
ACCEPTS: any number
203-
"""
202+
ACCEPTS: any number
203+
"""
204204
self.zorder = level
205205
self.pchanged()
206-
206+
207207
def update_from(self, other):
208208
'copy properties from other to self'
209209
self._transform = other._transform
@@ -406,13 +406,13 @@ def getp(o, *args):
406406
def get(o, *args, **kwargs):
407407
return getp(o, *args, **kwargs)
408408
get.__doc__ = getp.__doc__
409-
409+
410410
def set(*args, **kwargs):
411411
message = 'set deprecated because it overrides python2.4 builtin set. Use setp'
412412
warnings.warn(message, DeprecationWarning, stacklevel=2)
413413

414414
return setp(*args, **kwargs)
415-
415+
416416
def setp(h, *args, **kwargs):
417417
"""
418418
matlab(TM) and pylab allow you to use set and get to set and get
@@ -486,5 +486,5 @@ def setp(h, *args, **kwargs):
486486
return [x for x in flatten(ret)]
487487

488488

489-
490-
489+
490+

0 commit comments

Comments
 (0)