Skip to content

version 3.10.0 #1587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.10.0] - 2019-05-31

### Updated
- Updated Plotly.js to version 1.48.1. See the
[plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1481----2019-05-30)
for more information.

### Added
- Added funnel trace
([plotly/plotly.js#3817](https://github.com/plotly/plotly.js/pull/3817),
[plotly/plotly.js#3911](https://github.com/plotly/plotly.js/pull/3911))
- Added funnelarea traces
([#3876](https://github.com/plotly/plotly.js/pull/3876),
[#3912](https://github.com/plotly/plotly.js/pull/3912))
- Added support for shared color axes via coloraxis attributes in the layout
([#3803](https://github.com/plotly/plotly.js/pull/3803),
[#3786](https://github.com/plotly/plotly.js/pull/3786),
[#3901](https://github.com/plotly/plotly.js/pull/3901),
[#3916](https://github.com/plotly/plotly.js/pull/3916))
- Added support for sorting categorical cartesian axes by value
([#3864](https://github.com/plotly/plotly.js/pull/3864))
- Added `bingroup` to `histogram`, `histogram2d` and `histogram2dcontour`
to group traces to have compatible auto-bin values
([#3845](https://github.com/plotly/plotly.js/pull/3845))
- Add legend `itemclick` and `itemdoubleclick` attributes to set or disable
the legend item click and double-click behavior
([#3862](https://github.com/plotly/plotly.js/pull/3862))
- Added support for calling orca through [Xvfb](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml)
to support static image export on Linux when X11 is not available
([#1523](https://github.com/plotly/plotly.py/pull/1523)).

### Fixed
- Fixed `PlotlyJSONEncoder` encoding error when `simplejson` is installed
([#1556](https://github.com/plotly/plotly.py/issues/1556),
[#1561](https://github.com/plotly/plotly.py/pull/1561))
- HTML export now honors the figure height specified in the figure template
([#1560](https://github.com/plotly/plotly.py/issues/1560))
- Fixed display height of figure displayed in JupyterLab
([#1572](https://github.com/plotly/plotly.py/issues/1572),
[#1571](https://github.com/plotly/plotly.py/pull/1571))
- Fixed honouring of the `validate=False` option for all renderer types
([#1576](https://github.com/plotly/plotly.py/pull/1576))

## [3.9.0] - 2019-04-19

### Updated
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is

plotly.py may be installed using pip...
```
pip install plotly==3.9.0
pip install plotly==3.10.0
```

or conda.
```
conda install -c plotly plotly=3.9.0
conda install -c plotly plotly=3.10.0
```

### Jupyter Notebook Support
Expand Down Expand Up @@ -126,7 +126,7 @@ set NODE_OPTIONS=--max-old-space-size=4096
jupyter labextension install @jupyter-widgets/[email protected] --no-build

# FigureWidget support
jupyter labextension install plotlywidget@0.10.0 --no-build
jupyter labextension install plotlywidget@0.11.0 --no-build

# offline iplot support
jupyter labextension install @jupyterlab/[email protected] --no-build
Expand Down
14 changes: 7 additions & 7 deletions js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlywidget",
"version": "0.10.0",
"version": "0.11.0",
"description": "The plotly.py ipywidgets library",
"author": "The plotly.py team",
"license": "MIT",
Expand Down Expand Up @@ -31,7 +31,7 @@
"ify-loader": "^1.1.0"
},
"dependencies": {
"plotly.js": "1.48.0",
"plotly.js": "1.48.1",
"@jupyter-widgets/base": "^1.0.0",
"lodash": "^4.17.4"
},
Expand Down
3 changes: 2 additions & 1 deletion plotly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
utils,
offline,
colors,
io
io,
_docstring_gen
)

from plotly.version import __version__
Expand Down
28 changes: 28 additions & 0 deletions plotly/_docstring_gen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from __future__ import absolute_import
import re as _re
import plotly.io as pio
from plotly.basedatatypes import BaseFigure
import sys

# Perform docstrings generation
def copy_doc_without_fig(from_fn, to_method):
"""
Copy docstring from a plotly.io function to a Figure method, removing the
fig argument docstring in the process
"""
docstr = _re.sub(r' {4}fig:(?:.*?\n)*? {4}(\w+)', r' \1',
from_fn.__doc__)
if sys.version_info[0] < 3:
to_method.__func__.__doc__ = docstr
else:
to_method.__doc__ = docstr


copy_doc_without_fig(pio.show, BaseFigure.show)
copy_doc_without_fig(pio.to_json, BaseFigure.to_json)
copy_doc_without_fig(pio.write_json, BaseFigure.write_json)
copy_doc_without_fig(pio.to_html, BaseFigure.to_html)
copy_doc_without_fig(pio.write_html, BaseFigure.write_html)
copy_doc_without_fig(pio.to_image, BaseFigure.to_image)
copy_doc_without_fig(pio.write_image, BaseFigure.write_image)

2 changes: 1 addition & 1 deletion plotly/_widget_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# for automated dev builds
#
# It is edited by hand prior to official releases
__frontend_version__ = '^0.10.0'
__frontend_version__ = '^0.11.0'
31 changes: 31 additions & 0 deletions plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2619,6 +2619,37 @@ def to_ordered_dict(self, skip_uid=True):

return result

# plotly.io methods
# -----------------
# Note that docstrings are auto-generated in plotly/_docstring_gen.py
def show(self, *args, **kwargs):
import plotly.io as pio
return pio.show(self, *args, **kwargs)

def to_json(self, *args, **kwargs):
import plotly.io as pio
return pio.to_json(self, *args, **kwargs)

def write_json(self, *args, **kwargs):
import plotly.io as pio
return pio.write_json(self, *args, **kwargs)

def to_html(self, *args, **kwargs):
import plotly.io as pio
return pio.to_html(self, *args, **kwargs)

def write_html(self, *args, **kwargs):
import plotly.io as pio
return pio.write_html(self, *args, **kwargs)

def to_image(self, *args, **kwargs):
import plotly.io as pio
return pio.to_image(self, *args, **kwargs)

def write_image(self, *args, **kwargs):
import plotly.io as pio
return pio.write_image(self, *args, **kwargs)

# Static helpers
# --------------
@staticmethod
Expand Down
Loading