#NEWLINE# def _plot_unit( self , pinfo , ax ) : #NEWLINE# #INDENT# categorical = is_categorical ( pinfo [ 'x' ] ) #NEWLINE# pinfo . pop ( 'weight' ) #NEWLINE# x = pinfo . pop ( 'x' ) #NEWLINE# width_elem = pinfo . pop ( 'width' ) #NEWLINE# if ( width_elem == None ) : #NEWLINE# #INDENT# width = np . ones ( len ( _spacing_factor ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# width = np . array ( width_elem ) #NEWLINE# #UNINDENT# _reset = ( ( self . bottom == None ) or ( ( self . ax != None ) and ( self . ax != ax ) ) ) #NEWLINE# self . bottom = ( np . zeros ( len ( x ) ) if _reset else self . bottom ) #NEWLINE# self . ax = ax #NEWLINE# heights = np . array ( pinfo . pop ( 'y' ) ) #NEWLINE# _left_gap = 0 #NEWLINE# _spacing_factor = 0 #NEWLINE# if ( not categorical ) : #NEWLINE# #INDENT# left = np . array ( [ ( x [ i ] - ( width [ i ] / 2 ) ) for i in range ( len ( x ) ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _left_gap = 0.2 #NEWLINE# _spacing_factor = 0.105 #NEWLINE# _breaks = np . append ( [ 0 ] , width ) #NEWLINE# left = np . cumsum ( _breaks [ : ( - 1 ) ] ) #NEWLINE# #UNINDENT# _sep = ( width [ 0 ] * _spacing_factor ) #NEWLINE# left = ( ( left + _left_gap ) + [ ( _sep * i ) for i in range ( len ( left ) ) ] ) #NEWLINE# ax . bar ( left , heights , width , bottom = self . bottom , ** pinfo ) #NEWLINE# ax . autoscale ( ) #NEWLINE# if categorical : #NEWLINE# #INDENT# ax . set_xticks ( ( left + ( width / 2 ) ) ) #NEWLINE# ax . set_xticklabels ( x ) #NEWLINE# #UNINDENT# self . bottom = ( heights + self . bottom )