bokeh.models
Interfacebokeh.models.annotations
bokeh.models.axes
bokeh.models.callbacks
bokeh.models.formatters
bokeh.models.glyphs
bokeh.models.grids
bokeh.models.map_plots
bokeh.models.mappers
bokeh.models.markers
bokeh.models.plots
bokeh.models.ranges
bokeh.models.renderers
bokeh.models.sources
bokeh.models.tickers
bokeh.models.tools
bokeh.models.widget
bokeh.models.widgets.buttons
bokeh.models.widgets.dialogs
bokeh.models.widgets.groups
bokeh.models.widgets.icons
bokeh.models.widgets.inputs
bokeh.models.widgets.layouts
bokeh.models.widgets.markups
bokeh.models.widgets.panels
bokeh.models.widgets.tables
bokeh.validation
Package
bokeh.plotting
Interfacebokeh.charts
Interface
< ggplot_line | back to Gallery | xkcd_density >
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.draw()
plt.title("Step ggplot-based plot in Bokeh.")
output_file("step.html")
show(mpl.to_bokeh())