def to_bokeh(fig=None, tools=DEFAULT_TOOLS, use_pandas=True, xkcd=False):
 if (fig is None):
  fig = plt.gcf()
 renderer = BokehRenderer(tools, use_pandas, xkcd)
 exporter = BokehExporter(renderer)
 exporter.run(fig)
 return renderer.fig

def to_bokeh ( fig = None , tools = DEFAULT_TOOLS , use_pandas = True , xkcd = False ) : if ( fig is None ) : fig = plt . gcf ( ) renderer = BokehRenderer ( tools , use_pandas , xkcd ) exporter = BokehExporter ( renderer ) exporter . run ( fig ) return renderer . fig
uses bokeh to display a matplotlib figure .