4.14.3 • Published 3 years ago

jupyterlab-chart-editor v4.14.3

Weekly downloads
675
License
BSD-3-Clause
Repository
github
Last release
3 years ago

jupyterlab-chart-editor

Binder

A JupyterLab extension for editing Plotly charts, based on https://github.com/plotly/react-chart-editor

npm.io

Prerequisites

  • JupyterLab >= 1.2
  • plotly.py >= 4.4

Install

jupyter labextension install jupyterlab-chart-editor

Usage

Create and display a figure

import plotly.graph_objs as go
import plotly.io as pio

fig = go.Figure()
fig.add_scatter(y=[2, 4, 3, 2.5])
fig.show()

npm.io

Write figure to JSON

pio.write_json(fig, 'scatter.plotly')

Right-click scatter.plotly from the file menu and open with "Plotly Editor". Make some changes to the figure, then use the file menu to save as scatter-styled.plotly.

Then import scatter-styled.plotly back into plotly.py

fig_styled = pio.read_json('scatter-styled.plotly')
fig_styled

npm.io

Uninstall

jupyter labextension uninstall jupyterlab-chart-editor