Skip to content

Commit dbe8adb

Browse files
authored
Merge pull request #942 from plotly/ipyplotly_integration
Plotly 3.0.0 - Deep Jupyter Integration, Validation, Performance, and More
2 parents 519e0ab + 9302882 commit dbe8adb

File tree

6,739 files changed

+464970
-42244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,739 files changed

+464970
-42244
lines changed

.gitignore

+19-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,28 @@
1010

1111
*.tox
1212

13-
build
14-
15-
dist
16-
1713
debug_script.py
1814

1915
test_output.txt
2016

2117
plotly/api/v2/spectacle_presentations.py
2218

23-
plotly/presentation_objs/
19+
plotly/presentation_objs/
20+
21+
.idea
22+
23+
js/node_modules/
24+
25+
# Compiled javascript
26+
plotlywidget/static/
27+
28+
.pytest_cache
29+
30+
# virtual envs
31+
vv
32+
venv
33+
34+
# dist files
35+
build
36+
dist
37+
plotly.egg-info/

CHANGELOG.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,22 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [2.7.1] - [UNRELEASED]
6-
### Updated
7-
- error message for `plotly.figure_factory.create_choropleth` is now helpful to Anaconda users who do not have the correct modules installed for the County Choropleth figure factory.
5+
## 3.0.0 - 2018-07-05
6+
7+
This is a major version with many exciting updates. See the [Introducing plotly.py 3.0.0](https://medium.com/@plotlygraphs/introducing-plotly-py-3-0-0-7bb1333f69c6) post for more information.
8+
9+
### Added
10+
- Full Jupyter ipywidgets integration with the new `graph_objs.FigureWidget` class
11+
- `FigureWidget` figures can be updated interactively using property assignment syntax
12+
- The full trace and layout API is generated from the plotly schema to provide a great experience for interactive use in the notebook
13+
- Support for setting array properties as numpy arrays. When numpy arrays are used, ipywidgets binary serialization protocol is used to avoid converting these to JSON strings.
14+
- Context manager API for animation. Run `help(go.Figure().batch_animate)` for the full doc string.
15+
- Perform automatic retries when communicating with plot.ly services. This introduces a new required dependency on the [retrying](https://pypi.org/project/retrying/) library.
16+
- Improved data validation covering the full API with clear, informative error messages. This means that incorrect properties and/or values now always raise a `ValueError` with a description of the error, the invalid property, and the available properties on the level that it was placed in the graph object. Eg. `go.Scatter(foo=123)` raises a validation error. See https://plot.ly/python/reference/ for a reference to all valid properties and values in the Python API.
17+
- Error message for `plotly.figure_factory.create_choropleth` is now helpful to Anaconda users who do not have the correct modules installed for the County Choropleth figure factory.
18+
19+
### Changed / Deprecated
20+
Please see the [migration guid](migration-guide.md) for a full list of the changes and deprecations in version 3.0.0
821

922
## [2.7.0] - 2018-05-23
1023
### Updated

MANIFEST.in

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include LICENSE
2+
include README.rst
3+
include README.md
4+
include plotlywidget.json

README.md

+31-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# plotly.py
22

3-
> 📢 Announcement!
4-
> Registration is open for a 2 day, Dash master class in Washington DC, June 9-10.
5-
> [Register online here](https://plotcon.plot.ly/tickets/) 🎚📈🏛
6-
7-
***
8-
3+
## Overview
94
[plotly.py](https://plot.ly/d3-js-for-python-and-pandas-charts/) is an interactive, browser-based graphing library for Python :sparkles:
105

116
Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is a high-level, declarative charting library. plotly.js ships with over 30 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.
@@ -22,14 +17,42 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
2217
***
2318

2419
- [Online Documentation](https://plot.ly/python)
25-
- [`contributing.md`](https://github.com/plotly/python-api/blob/master/contributing.md)
20+
- [Contributing](contributing.md)
21+
- [Changelog](CHANGELOG.md)
2622
- [Code of Conduct](CODE_OF_CONDUCT.md)
23+
- [Version 3 Migration Guide](migration-guide.md)
2724
- [New! Announcing Dash](https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503)
2825
- [Community](https://community.plot.ly/c/api/python)
2926

3027
***
3128

32-
Code and documentation copyright 2017 Plotly, Inc.
29+
## Installation of plotly.py Version 3
30+
To install plotly.py and enable Jupyter or Jupyter Lab support, run:
31+
```
32+
pip install "plotly>=3.0"
33+
pip install "notebook>=5.3" "ipywidgets>=7.2" # only necessary for Jupyter Notebook environments
34+
```
35+
36+
If you're using older versions of `notebook` or `ipywidgets` you may need to manually activate the widget extensions (this should not be needed for `notebook>=5.3` and `ipywidgets>=7.2`)
37+
38+
```
39+
jupyter nbextension enable --py widgetsnbextension --sys-prefix
40+
jupyter nbextension enable --py plotlywidget --sys-prefix
41+
```
42+
43+
In addition, to add JupyterLab support run the following commands
44+
45+
```
46+
pip install jupyterlab
47+
export NODE_OPTIONS=--max-old-space-size=4096
48+
jupyter labextension install @jupyter-widgets/jupyterlab-manager # install the Jupyter widgets extension
49+
jupyter labextension install plotlywidget
50+
```
51+
52+
If you're migrating from plotly.py version 2, please check out the [migration guid](migration-guide.md)
53+
54+
## Copyright and Licenses
55+
Code and documentation copyright 2018 Plotly, Inc.
3356

3457
Code released under the [MIT license](LICENSE.txt).
3558

_plotly_utils/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This package is for utilities that are used during code generation
2+
and at runtime. The reason for not placing these under the main plotly/
3+
package is that this avoids the complications of importing the module
4+
we're generating code into during code generation.
5+
6+
This module must be independent of (it must not import from) both
7+
plotly/ and codegen/

_plotly_utils/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)