Bokeh plugin for H2O Nitro
Project description
Bokeh plugin for H2O Nitro
This plugin lets you use Bokeh visualizations in Nitro apps.
Demo
Install
pip install h2o-nitro-bokeh
Usage
- Import
bokeh_plugin
andbokeh_box
fromh2o_nitro_bokeh
. - Add
bokeh_plugin()
to your Nitro app. - Use
bokeh_box(model)
to render Bokeh models (figures, widgets, and so on).
from bokeh.plotting import figure, show
from h2o_nitro import View, web_directory
from h2o_nitro_bokeh import bokeh_plugin, bokeh_box
def main(view: View):
view(bokeh_box(make_plot()))
nitro = View(
main,
title='Nitro + Bokeh',
caption='A minimal example',
plugins=[bokeh_plugin()], # Include the Bokeh plugin
)
def make_plot():
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(title="Simple line example", x_axis_label="x", y_axis_label="y")
p.line(x, y, legend_label="Temp.", line_width=2)
return p
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for h2o_nitro_bokeh-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c438e9493d14cf6a9e125235ae0214994e77c2c8fb19993f8631cb3200a1628b |
|
MD5 | 83e87c68afeec9a1dbb785ebd054132e |
|
BLAKE2b-256 | 686bc02ea50db30824e71e6cfd1f79885bc43b3ad8945783e64831b10380afd7 |