Skip to main content

Bokeh plugin for H2O Nitro

Project description

Bokeh plugin for H2O Nitro

This plugin lets you use Bokeh visualizations in Nitro apps.

Demo

View source.

Demo

Install

pip install h2o-nitro-bokeh

Usage

  1. Import bokeh_plugin and bokeh_box from h2o_nitro_bokeh.
  2. Add bokeh_plugin() to your Nitro app.
  3. 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

h2o_nitro_bokeh-0.2.0-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page