Skip to main content

Deephaven Plugin for Plotly

Project description

Deephaven Plugin for Plotly

The Deephaven Plugin for Plotly. Allows for opening Plotly plots in a Deephaven environment. Any Plotly plot should be viewable by default. For example:

Scatter Plot

import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
                 size='petal_length', hover_data=['petal_width'])

Box Plot

import plotly.express as px
df = px.data.tips()
fig = px.box(df, x="time", y="total_bill")

Multiple Series

It's possible to have multiple kinds of series in the same figure. Here is an example driving a line and a bar plot:

from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(rows=1, cols=2)
fig.add_trace(
    go.Scatter(x=[1, 2, 3], y=[4, 5, 6]),
    row=1, col=1)
fig.add_trace(
    go.Bar(x=[1, 2, 3], y=[4, 5, 6], marker=dict(color=[4, 5, 6], coloraxis="coloraxis")),
    row=1, col=2)
fig.update_layout(title_text="Side By Side Subplots", showlegend=False)

Plot data from a Deephaven table

from deephaven import empty_table, numpy
import plotly.express as px
t = empty_table(300).update(formulas=["X = (double)i", "Y = Math.sin(X)"])
data = numpy.to_numpy(t, ["X", "Y"])
fig = px.line(x=data[:,0], y=data[:,1])

Build

To create your build / development environment:

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools
pip install build deephaven-plugin plotly

To build:

python -m build --wheel

The wheel is stored in dist/.

To test within deephaven-core, note where this wheel is stored (using pwd, for example). Then, follow the directions in the deephaven-js-plugins repo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deephaven-plugin-plotly-0.0.1.dev2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deephaven_plugin_plotly-0.0.1.dev2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file deephaven-plugin-plotly-0.0.1.dev2.tar.gz.

File metadata

File hashes

Hashes for deephaven-plugin-plotly-0.0.1.dev2.tar.gz
Algorithm Hash digest
SHA256 8dbe4ea1b650f8856d7d6b890d0e9d519f3bff1634a9f296f2420f930b9e33f9
MD5 03cf6ada043d41bd7b3d12d8db2faa7e
BLAKE2b-256 6b3d5eaec908d3db5a0964872f0b3163e92fbbe582b530da7acf0c3980245a03

See more details on using hashes here.

File details

Details for the file deephaven_plugin_plotly-0.0.1.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for deephaven_plugin_plotly-0.0.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab4d9dbbd92760df2330ff265faac5fcba8627ccde074544ba4925f6db9f34c8
MD5 8bf45edad326f62859567a29b6a20f83
BLAKE2b-256 61bf6fc5afaa491e78bfa5af27a77d7b1699e5ae100326bb6f7fd6b83f6a1666

See more details on using hashes here.

Supported by

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