Skip to content

Commit 7cce283

Browse files
authored
version 3.10.0 (plotly#1587)
* Added initial CHANGELOG for 3.10.0 * Update README installation versions * Update EPS baselines * Update to plotly.js 1.48.1 * Added figure methods for show, and json, html, image export functions * Update plotlywidget to version 0.11.0
1 parent d0950b8 commit 7cce283

File tree

15 files changed

+310
-221
lines changed

15 files changed

+310
-221
lines changed

Diff for: CHANGELOG.md

+43
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,49 @@
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+
## [3.10.0] - 2019-05-31
6+
7+
### Updated
8+
- Updated Plotly.js to version 1.48.1. See the
9+
[plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1481----2019-05-30)
10+
for more information.
11+
12+
### Added
13+
- Added funnel trace
14+
([plotly/plotly.js#3817](https://github.com/plotly/plotly.js/pull/3817),
15+
[plotly/plotly.js#3911](https://github.com/plotly/plotly.js/pull/3911))
16+
- Added funnelarea traces
17+
([#3876](https://github.com/plotly/plotly.js/pull/3876),
18+
[#3912](https://github.com/plotly/plotly.js/pull/3912))
19+
- Added support for shared color axes via coloraxis attributes in the layout
20+
([#3803](https://github.com/plotly/plotly.js/pull/3803),
21+
[#3786](https://github.com/plotly/plotly.js/pull/3786),
22+
[#3901](https://github.com/plotly/plotly.js/pull/3901),
23+
[#3916](https://github.com/plotly/plotly.js/pull/3916))
24+
- Added support for sorting categorical cartesian axes by value
25+
([#3864](https://github.com/plotly/plotly.js/pull/3864))
26+
- Added `bingroup` to `histogram`, `histogram2d` and `histogram2dcontour`
27+
to group traces to have compatible auto-bin values
28+
([#3845](https://github.com/plotly/plotly.js/pull/3845))
29+
- Add legend `itemclick` and `itemdoubleclick` attributes to set or disable
30+
the legend item click and double-click behavior
31+
([#3862](https://github.com/plotly/plotly.js/pull/3862))
32+
- Added support for calling orca through [Xvfb](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml)
33+
to support static image export on Linux when X11 is not available
34+
([#1523](https://github.com/plotly/plotly.py/pull/1523)).
35+
36+
### Fixed
37+
- Fixed `PlotlyJSONEncoder` encoding error when `simplejson` is installed
38+
([#1556](https://github.com/plotly/plotly.py/issues/1556),
39+
[#1561](https://github.com/plotly/plotly.py/pull/1561))
40+
- HTML export now honors the figure height specified in the figure template
41+
([#1560](https://github.com/plotly/plotly.py/issues/1560))
42+
- Fixed display height of figure displayed in JupyterLab
43+
([#1572](https://github.com/plotly/plotly.py/issues/1572),
44+
[#1571](https://github.com/plotly/plotly.py/pull/1571))
45+
- Fixed honouring of the `validate=False` option for all renderer types
46+
([#1576](https://github.com/plotly/plotly.py/pull/1576))
47+
548
## [3.9.0] - 2019-04-19
649

750
### Updated

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
7878

7979
plotly.py may be installed using pip...
8080
```
81-
pip install plotly==3.9.0
81+
pip install plotly==3.10.0
8282
```
8383

8484
or conda.
8585
```
86-
conda install -c plotly plotly=3.9.0
86+
conda install -c plotly plotly=3.10.0
8787
```
8888

8989
### Jupyter Notebook Support
@@ -126,7 +126,7 @@ set NODE_OPTIONS=--max-old-space-size=4096
126126
jupyter labextension install @jupyter-widgets/[email protected] --no-build
127127
128128
# FigureWidget support
129-
jupyter labextension install plotlywidget@0.10.0 --no-build
129+
jupyter labextension install plotlywidget@0.11.0 --no-build
130130
131131
# offline iplot support
132132
jupyter labextension install @jupyterlab/[email protected] --no-build

Diff for: js/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotlywidget",
3-
"version": "0.10.0",
3+
"version": "0.11.0",
44
"description": "The plotly.py ipywidgets library",
55
"author": "The plotly.py team",
66
"license": "MIT",
@@ -31,7 +31,7 @@
3131
"ify-loader": "^1.1.0"
3232
},
3333
"dependencies": {
34-
"plotly.js": "1.48.0",
34+
"plotly.js": "1.48.1",
3535
"@jupyter-widgets/base": "^1.0.0",
3636
"lodash": "^4.17.4"
3737
},

Diff for: plotly/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
utils,
3636
offline,
3737
colors,
38-
io
38+
io,
39+
_docstring_gen
3940
)
4041

4142
from plotly.version import __version__

Diff for: plotly/_docstring_gen.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from __future__ import absolute_import
2+
import re as _re
3+
import plotly.io as pio
4+
from plotly.basedatatypes import BaseFigure
5+
import sys
6+
7+
# Perform docstrings generation
8+
def copy_doc_without_fig(from_fn, to_method):
9+
"""
10+
Copy docstring from a plotly.io function to a Figure method, removing the
11+
fig argument docstring in the process
12+
"""
13+
docstr = _re.sub(r' {4}fig:(?:.*?\n)*? {4}(\w+)', r' \1',
14+
from_fn.__doc__)
15+
if sys.version_info[0] < 3:
16+
to_method.__func__.__doc__ = docstr
17+
else:
18+
to_method.__doc__ = docstr
19+
20+
21+
copy_doc_without_fig(pio.show, BaseFigure.show)
22+
copy_doc_without_fig(pio.to_json, BaseFigure.to_json)
23+
copy_doc_without_fig(pio.write_json, BaseFigure.write_json)
24+
copy_doc_without_fig(pio.to_html, BaseFigure.to_html)
25+
copy_doc_without_fig(pio.write_html, BaseFigure.write_html)
26+
copy_doc_without_fig(pio.to_image, BaseFigure.to_image)
27+
copy_doc_without_fig(pio.write_image, BaseFigure.write_image)
28+

Diff for: plotly/_widget_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# for automated dev builds
33
#
44
# It is edited by hand prior to official releases
5-
__frontend_version__ = '^0.10.0'
5+
__frontend_version__ = '^0.11.0'

Diff for: plotly/basedatatypes.py

+31
Original file line numberDiff line numberDiff line change
@@ -2619,6 +2619,37 @@ def to_ordered_dict(self, skip_uid=True):
26192619

26202620
return result
26212621

2622+
# plotly.io methods
2623+
# -----------------
2624+
# Note that docstrings are auto-generated in plotly/_docstring_gen.py
2625+
def show(self, *args, **kwargs):
2626+
import plotly.io as pio
2627+
return pio.show(self, *args, **kwargs)
2628+
2629+
def to_json(self, *args, **kwargs):
2630+
import plotly.io as pio
2631+
return pio.to_json(self, *args, **kwargs)
2632+
2633+
def write_json(self, *args, **kwargs):
2634+
import plotly.io as pio
2635+
return pio.write_json(self, *args, **kwargs)
2636+
2637+
def to_html(self, *args, **kwargs):
2638+
import plotly.io as pio
2639+
return pio.to_html(self, *args, **kwargs)
2640+
2641+
def write_html(self, *args, **kwargs):
2642+
import plotly.io as pio
2643+
return pio.write_html(self, *args, **kwargs)
2644+
2645+
def to_image(self, *args, **kwargs):
2646+
import plotly.io as pio
2647+
return pio.to_image(self, *args, **kwargs)
2648+
2649+
def write_image(self, *args, **kwargs):
2650+
import plotly.io as pio
2651+
return pio.write_image(self, *args, **kwargs)
2652+
26222653
# Static helpers
26232654
# --------------
26242655
@staticmethod

0 commit comments

Comments
 (0)