#NEWLINE# def apply( self , obj , defaults = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , **kwargs ) : #NEWLINE# #INDENT# ': Apply this style to the given object using the supplied defaults.\n\n      = NOTE\n      - This can apply to any matplotlib Patch object.\n\n      = INPUT VARIABLES\n      - obj       The object to apply the style to.\n      - defaults  Keyword-value dictionary with defaults values to use if a\n                  property value is not specified.\n      - kwargs    Keyword-value dictionary whose values will supercede\n                  any values set by the properties of this sub-style.\n      ' #NEWLINE# if ( not isinstance ( obj , mplpatch . Patch ) ) : #NEWLINE# #INDENT# msg = ( "Unable to apply this sub-style to the given element.Expected a matplotlib 'Patch' and instead received the following:\n%s" % ( obj , ) ) #NEWLINE# raise Exception ( msg ) #NEWLINE# #UNINDENT# properties = { #NEWLINE# #INDENT# 'antialiased' : 'antialiased' , #NEWLINE# 'color' : 'facecolor' , #NEWLINE# 'filled' : 'fill' , #NEWLINE# 'edgeColor' : 'edgecolor' , #NEWLINE# 'edgeWidth' : 'linewidth' , #NEWLINE# 'edgeStyle' : 'linestyle' , #NEWLINE# #UNINDENT# } #NEWLINE# MplArtistStyle . apply ( self , obj , defaults , ** kwargs ) #NEWLINE# kw = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for p in properties : #NEWLINE# #INDENT# mplProp = properties [ p ] #NEWLINE# value = self . getValue ( p , defaults , ** kwargs ) #NEWLINE# if ( value is not None ) : #NEWLINE# #INDENT# kw [ kwargs ] = value #NEWLINE# #UNINDENT# #UNINDENT# ec = kw . get ( 'edgecolor' , None ) #NEWLINE# if ( ec is None ) : #NEWLINE# #INDENT# ec = kw . get ( 'facecolor' , None ) #NEWLINE# #UNINDENT# if ec : #NEWLINE# #INDENT# kw [ 'edgecolor' ] = ec #NEWLINE# #UNINDENT# if ( 'linestyle' in kw ) : #NEWLINE# #INDENT# kw [ 'linestyle' ] = EDGE_STYLE_MAP [ kw [ 'linestyle' ] ] #NEWLINE# #UNINDENT# if kw : #NEWLINE# #INDENT# obj . update ( kw )