#NEWLINE# def show_canvas( self , canvas , filename = None , **kwargs ) : #NEWLINE# #INDENT# ( figure , _ , _ ) = canvas #NEWLINE# if ( len ( figure . data ) == 0 ) : #NEWLINE# #INDENT# figure . append_trace ( Scatter ( x = [ ] , y = [ ] , name = '' , showlegend = False ) , 1 , 1 ) #NEWLINE# #UNINDENT# from .. gpy_plot.plot_util import in_ipynb #NEWLINE# if in_ipynb ( ) : #NEWLINE# #INDENT# return py . iplot ( figure , filename = filename ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return py . plot ( figure , filename = filename )