File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -599,25 +599,25 @@ def __init__(
599599 for getter_name in getter_names :
600600 try :
601601 color = getattr (handle , getter_name )()
602- if isinstance (color , np .ndarray ):
603- if color .size == 0 :
604- continue
605- elif (
606- color .shape [0 ] == 1
607- or np .isclose (color , color [0 ]).all ()
608- ):
609- text .set_color (color [0 ])
610- else :
611- pass
612- elif cbook ._str_lower_equal (color , 'none' ):
602+ except AttributeError :
603+ continue
604+ if isinstance (color , np .ndarray ):
605+ if color .size == 0 :
613606 continue
614- elif mpl .colors .to_rgba (color )[3 ] == 0 :
615- continue
607+ elif (
608+ color .shape [0 ] == 1
609+ or np .isclose (color , color [0 ]).all ()
610+ ):
611+ text .set_color (color [0 ])
616612 else :
617- text .set_color (color )
618- break
619- except AttributeError :
613+ pass
614+ elif cbook ._str_lower_equal (color , 'none' ):
620615 continue
616+ elif mpl .colors .to_rgba (color )[3 ] == 0 :
617+ continue
618+ else :
619+ text .set_color (color )
620+ break
621621 elif cbook ._str_equal (labelcolor , 'none' ):
622622 for text in self .texts :
623623 text .set_color (labelcolor )
You can’t perform that action at this time.
0 commit comments