#NEWLINE# def _process_legend( self ) : #NEWLINE# #INDENT# plot = self . handles [ 'plot' ] #NEWLINE# if ( ( not self . show_legend ) or ( len ( plot . legend ) == 0 ) ) : #NEWLINE# #INDENT# for l in plot . legend : #NEWLINE# #INDENT# l . legends [ : ] = [ ] #NEWLINE# l . border_line_alpha = 0 #NEWLINE# l . background_fill_alpha = 0 #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# options = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# properties = self . lookup_options ( self . hmap . last , 'style' ) [ self . cyclic_index ] #NEWLINE# for ( k , v ) in properties . items ( ) : #NEWLINE# #INDENT# if ( k in line_properties ) : #NEWLINE# #INDENT# k = ( 'border_' + k ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( k in text_properties ) : #NEWLINE# #INDENT# k = ( 'label_' + k ) #NEWLINE# #UNINDENT# #UNINDENT# options [ k ] = v #NEWLINE# #UNINDENT# legend_labels = [ ] #NEWLINE# if ( not plot . legend ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# plot . legend [ 0 ] . set ( ** options ) #NEWLINE# legend_fontsize = self . _fontsize ( 'legend' , 'size' ) . get ( 'size' , False ) #NEWLINE# if legend_fontsize : #NEWLINE# #INDENT# plot . legend [ 0 ] . label_text_font_size = legend_fontsize #NEWLINE# #UNINDENT# if bokeh_lt_011 : #NEWLINE# #INDENT# plot . legend . orientation = self . legend_position #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# plot . legend . location = self . legend_position #NEWLINE# #UNINDENT# legends = plot . legend [ 0 ] . legends #NEWLINE# new_legends = [ ] #NEWLINE# for ( label , l ) in legends : #NEWLINE# #INDENT# if ( label in legend_labels ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# legend_labels . append ( label ) #NEWLINE# new_legends . append ( ( label , l ) ) #NEWLINE# #UNINDENT# plot . legend [ 0 ] . legends [ : ] = new_legends