2

With the following code:

import bokeh.plotting as bplt
bplt.output_file('output.html', mode="cdn")

I get an html file with my graph(s); but it has the text:

You have 1 plots
Close All Plots

Above the graph.

Is there a way to produce html output without this text?

prooffreader
  • 2,333
  • 4
  • 21
  • 32

1 Answers1

3

As of Bokeh 0.5 there is a much more convenient embed module, which should provide the functionality you desire.

In your specific case, I would suggest the following setup:

  1. Load BokehJS from CDN at the top of your page (or in the head)
    <script src="http://cdn.bokeh.org/bokeh-0.5.1.js"></script>

  2. In the Python script generating the plots, run

    bokeh.embed.components(bokeh.plotting.curplot(), bokeh.resources.CDN)

    for each plot. That will return a tuple with a <script> string containing the plot generation code, and a <div> string you can place anywhere on your page as a target.

Community
  • 1
  • 1
karan.dodia
  • 384
  • 1
  • 4
  • 17