#NEWLINE# def _update_plot( self , axis , view , style ) : #NEWLINE# #INDENT# if ( self . plot_type == 'factorplot' ) : #NEWLINE# #INDENT# opts = dict ( style , ** ( { #NEWLINE# #INDENT# 'hue' : view . x2 , #NEWLINE# #UNINDENT# } if view . x2 else { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# sns . factorplot ( x = view . x , y = view . y , data = view . data , ** opts ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'regplot' ) : #NEWLINE# #INDENT# sns . regplot ( x = view . x , y = view . y , data = view . data , ax = axis , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'boxplot' ) : #NEWLINE# #INDENT# style . pop ( 'return_type' , None ) #NEWLINE# style . pop ( 'figsize' , None ) #NEWLINE# sns . boxplot ( view . data [ view . y ] , view . data [ view . x ] , ax = axis , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'violinplot' ) : #NEWLINE# #INDENT# if view . x : #NEWLINE# #INDENT# sns . violinplot ( view . data [ view . y ] , view . data [ view . x ] , ax = axis , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sns . violinplot ( view . data , ax = axis , ** style ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'interact' ) : #NEWLINE# #INDENT# sns . interactplot ( view . x , view . x2 , view . y , data = view . data , ax = axis , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'lmplot' ) : #NEWLINE# #INDENT# sns . lmplot ( x = view . x , y = view . y , data = view . data , ax = axis , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type in [ 'pairplot' , 'pairgrid' , 'facetgrid' ] ) : #NEWLINE# #INDENT# style_keys = list ( style . keys ( ) ) #NEWLINE# map_opts = [ ( k , style . pop ( k ) ) for k in style_keys if ( 'map' in k ) ] #NEWLINE# if ( self . plot_type == 'pairplot' ) : #NEWLINE# #INDENT# g = sns . pairplot ( view . data , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'pairgrid' ) : #NEWLINE# #INDENT# g = sns . PairGrid ( view . data , ** style ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . plot_type == 'facetgrid' ) : #NEWLINE# #INDENT# g = sns . FacetGrid ( view . data , ** style ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for ( opt , args ) in map_opts : #NEWLINE# #INDENT# plot_fn = ( getattr ( sns , args [ 0 ] ) if hasattr ( sns , args [ 0 ] ) else getattr ( plt , args [ 0 ] ) ) #NEWLINE# getattr ( g , opt ) ( g , * args [ 1 : ] ) #NEWLINE# #UNINDENT# if self . _close_figures : #NEWLINE# #INDENT# plt . close ( self . handles [ 'fig' ] ) #NEWLINE# #UNINDENT# self . handles [ 'fig' ] = plt . gcf ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# super ( SNSFramePlot , self ) . _update_plot ( axis , view , style )