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_step

< ggplot_line | back to Gallery | seaborn_violin >

          from ggplot import aes, geom_step, ggplot
          import matplotlib.pyplot as plt
          import numpy as np
          import pandas as pd
          
          from bokeh import mpl
          from bokeh.plotting import output_file, show
          
          df = pd.DataFrame({
              "x": range(100),
              "y": np.random.choice([-1, 1], 100)
          })
          df.y = df.y.cumsum()
          
          g = ggplot(aes(x='x', y='y'), data=df) + geom_step()
          g.make()
          
          plt.title("Step ggplot-based plot in Bokeh.")
          
          output_file("ggplot_step.html", title="ggplot_step.py example")
          
          show(mpl.to_bokeh())