@@ -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 )
@@ -375,6 +382,7 @@ def set_linestyle(self, ls):
375
382
376
383
ls = cbook .ls_mapper .get (ls , ls )
377
384
self ._linestyle = ls
385
+ self .stale = True
378
386
379
387
def set_ls (self , ls ):
380
388
"""alias for set_linestyle"""
@@ -388,6 +396,7 @@ def set_fill(self, b):
388
396
"""
389
397
self ._fill = bool (b )
390
398
self .set_facecolor (self ._original_facecolor )
399
+ self .stale = True
391
400
392
401
def get_fill (self ):
393
402
'return whether fill is set'
@@ -409,6 +418,7 @@ def set_capstyle(self, s):
409
418
raise ValueError ('set_capstyle passed "%s";\n ' % (s ,) +
410
419
'valid capstyles are %s' % (self .validCap ,))
411
420
self ._capstyle = s
421
+ self .stale = True
412
422
413
423
def get_capstyle (self ):
414
424
"Return the current capstyle"
@@ -425,6 +435,7 @@ def set_joinstyle(self, s):
425
435
raise ValueError ('set_joinstyle passed "%s";\n ' % (s ,) +
426
436
'valid joinstyles are %s' % (self .validJoin ,))
427
437
self ._joinstyle = s
438
+ self .stale = True
428
439
429
440
def get_joinstyle (self ):
430
441
"Return the current joinstyle"
@@ -457,6 +468,7 @@ def set_hatch(self, hatch):
457
468
ACCEPTS: ['/' | '\\ \\ ' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*']
458
469
"""
459
470
self ._hatch = hatch
471
+ self .stale = True
460
472
461
473
def get_hatch (self ):
462
474
'Return the current hatching pattern'
@@ -511,6 +523,7 @@ def draw(self, renderer):
511
523
512
524
gc .restore ()
513
525
renderer .close_group ('patch' )
526
+ self .stale = False
514
527
515
528
def get_path (self ):
516
529
"""
0 commit comments