This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

Bokeh Docs

ggplot_density

< step_chart | back to Gallery | ggplot_line >

          from ggplot import aes, diamonds, geom_density, ggplot
          import matplotlib.pyplot as plt
          
          from bokeh import mpl
          from bokeh.plotting import output_file, show
          
          g = ggplot(diamonds, aes(x='price', color='cut')) + geom_density()
          g.make()
          
          plt.title("Density ggplot-based plot in Bokeh.")
          
          output_file("ggplot_density.html", title="ggplot_density.py example")
          
          show(mpl.to_bokeh())