@@ -257,6 +257,7 @@ def set_antialiased(self, aa):
257
257
if aa is None :
258
258
aa = mpl .rcParams ['patch.antialiased' ]
259
259
self ._antialiased = aa
260
+ self .stale = True
260
261
261
262
def set_aa (self , aa ):
262
263
"""alias for set_antialiased"""
@@ -272,6 +273,7 @@ def set_edgecolor(self, color):
272
273
color = mpl .rcParams ['patch.edgecolor' ]
273
274
self ._original_edgecolor = color
274
275
self ._edgecolor = colors .colorConverter .to_rgba (color , self ._alpha )
276
+ self .stale = True
275
277
276
278
def set_ec (self , color ):
277
279
"""alias for set_edgecolor"""
@@ -291,6 +293,7 @@ def set_facecolor(self, color):
291
293
if not self ._fill :
292
294
self ._facecolor = list (self ._facecolor )
293
295
self ._facecolor [3 ] = 0
296
+ self .stale = True
294
297
295
298
def set_fc (self , color ):
296
299
"""alias for set_facecolor"""
@@ -325,6 +328,7 @@ def set_alpha(self, alpha):
325
328
# using self._fill and self._alpha
326
329
self .set_facecolor (self ._original_facecolor )
327
330
self .set_edgecolor (self ._original_edgecolor )
331
+ self .stale = True
328
332
329
333
def set_linewidth (self , w ):
330
334
"""
@@ -334,8 +338,11 @@ def set_linewidth(self, w):
334
338
"""
335
339
if w is None :
336
340
w = mpl .rcParams ['patch.linewidth' ]
341
+
337
342
self ._linewidth = float (w )
338
343
344
+ self .stale = True
345
+
339
346
def set_lw (self , lw ):
340
347
"""alias for set_linewidth"""
341
348
return self .set_linewidth (lw )
@@ -349,6 +356,7 @@ def set_linestyle(self, ls):
349
356
if ls is None :
350
357
ls = "solid"
351
358
self ._linestyle = ls
359
+ self .stale = True
352
360
353
361
def set_ls (self , ls ):
354
362
"""alias for set_linestyle"""
@@ -362,6 +370,7 @@ def set_fill(self, b):
362
370
"""
363
371
self ._fill = bool (b )
364
372
self .set_facecolor (self ._original_facecolor )
373
+ self .stale = True
365
374
366
375
def get_fill (self ):
367
376
'return whether fill is set'
@@ -383,6 +392,7 @@ def set_capstyle(self, s):
383
392
raise ValueError ('set_capstyle passed "%s";\n ' % (s ,) +
384
393
'valid capstyles are %s' % (self .validCap ,))
385
394
self ._capstyle = s
395
+ self .stale = True
386
396
387
397
def get_capstyle (self ):
388
398
"Return the current capstyle"
@@ -399,6 +409,7 @@ def set_joinstyle(self, s):
399
409
raise ValueError ('set_joinstyle passed "%s";\n ' % (s ,) +
400
410
'valid joinstyles are %s' % (self .validJoin ,))
401
411
self ._joinstyle = s
412
+ self .stale = True
402
413
403
414
def get_joinstyle (self ):
404
415
"Return the current joinstyle"
@@ -431,6 +442,7 @@ def set_hatch(self, hatch):
431
442
ACCEPTS: ['/' | '\\ \\ ' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*']
432
443
"""
433
444
self ._hatch = hatch
445
+ self .stale = True
434
446
435
447
def get_hatch (self ):
436
448
'Return the current hatching pattern'
@@ -485,6 +497,7 @@ def draw(self, renderer):
485
497
486
498
gc .restore ()
487
499
renderer .close_group ('patch' )
500
+ self .stale = False
488
501
489
502
def get_path (self ):
490
503
"""
0 commit comments