Skip to content

hefv57/plotlywrapper

 
 

Repository files navigation

Plotlywrapper: pythonic plotly

Build Status rtd.io PyPI version PyPI codecov.io

NOTICE you may be better off using plotly express depending on your needs.

Plotlywrapper wraps plotly to make easy plots easy to make. Check out the docs!

Motivation

Compare the following code snippets which generate the same plot.

Plotly

Taken from https://plot.ly/python/getting-started/

import plotly from plotly.graph_objs import Scatter, Layout plotly.offline.plot({ "data": [ Scatter(x=[1, 2, 3, 4], y=[4, 1, 3, 7]) ], "layout": Layout( title="hello world" ) })

Plotlywrapper

import plotlywrapper as pw plot = pw.line(x=[1, 2, 3, 4], y=[4, 1, 3, 7]) plot.title('hello world') plot.show()

Install

To install the latest release:

pip install plotlywrapper 

Demo

Try out the interactive demo here,

Binder

or view the notebook statically.

JupyterLab

Plotly doesn’t render in JupyterLab by default. You need to install the JupyterLab Plotly extension:

jupyter labextension install @jupyterlab/plotly-extension 

Developed in this repo.

Testing

To test run:

make test 

About

🌯 simple plotly python api

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 99.6%
  • Other 0.4%