跳转到主要内容

Deephaven Plotly插件

项目描述

Deephaven Plotly插件

Deephaven Plotly插件。允许在Deephaven环境中打开Plotly图表。任何Plotly图表都应默认可查看。例如

散点图

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'])

箱线图

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

多个系列

可以在同一图表中拥有多种类型的系列。以下是一个驱动线和柱状图的示例

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)

从Deephaven表中的数据绘制图表

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])

构建

为了创建您的构建/开发环境

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

构建

python -m build --wheel

轮文件存储在 dist/

deephaven-core内测试时,请注意轮文件存储位置(例如使用pwd)。然后,按照deephaven-js-plugins仓库中的说明进行操作。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码发行版

deephaven-plugin-plotly-0.2.0.tar.gz (7.6 kB 查看哈希值)

上传时间 源代码

构建发行版

deephaven_plugin_plotly-0.2.0-py3-none-any.whl (8.5 kB 查看哈希值)

上传时间 Python 3

由以下支持