Skip to content

Release 4.1.0 #1704

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 14 commits into from
Aug 7, 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
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.1.0] - 2019-08-06

### Updated
- Updated Plotly.js to version 1.49.1. See the
[plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1491----2019-07-31)
for more information.
- Bars in the figures produced by the `create_gantt` figure factory may now be hidden by clicking on the legend ([#1665](https://github.com/plotly/plotly.py/pull/1665)). Special thanks to [@csabaszan](https://github.com/csabaszan) for this contribution!
- Improved performance when serializing figures containing large numpy arrays ([#1690](https://github.com/plotly/plotly.py/pull/1690)). Special thanks to [@miriad](https://github.com/miriad) for this contribution!

### Added
- Added new renderers for displaying figures from within the Databricks and CoCalc notebook services ([#1703](https://github.com/plotly/plotly.py/pull/1703))
- Added `indicator` traces ([plotly/plotly.js#3978](https://github.com/plotly/plotly.js/pull/3978))
- Added `choroplethmapbox` traces ([plotly/plotly.js#3988](https://github.com/plotly/plotly.js/pull/3988))
- Added `densitymapbox` traces ([plotly/plotly.js#3993](https://github.com/plotly/plotly.js/pull/3993))
- Added new mapbox `style` values: `open-street-map`, `carto-positron`, `carto-darkmatter`,
`stamen-terrain`, `stamen-toner`, `stamen-watercolor` and `white-bg`
that do not require a Mapbox access token ([plotly/plotly.js#3987](https://github.com/plotly/plotly.js/pull/3987), [plotly/plotly.js#4068](https://github.com/plotly/plotly.js/pull/4068))
- Added support for `sourcetype` value `raster` and `image` and `type` `raster`
for mapbox layout layers ([plotly/plotly.js#4006](https://github.com/plotly/plotly.js/pull/4006))
- Added `below` attribute to `scattermapbox` traces ([plotly/plotly.js#4058](https://github.com/plotly/plotly.js/pull/4058))
- Added support for `below: 'traces'` in mapbox layout layers ([plotly/plotly.js#4058](https://github.com/plotly/plotly.js/pull/4058))
- Added `sourceattribution` attribute to mapbox layout layers ([plotly/plotly.js#4069](https://github.com/plotly/plotly.js/pull/4069))
- Added `labelangle` and `labelside` attributes to `parcoords` traces ([plotly/plotly.js#3966](https://github.com/plotly/plotly.js/pull/3966))
- Added `doubleClickDelay` config option ([plotly/plotly.js#3991](https://github.com/plotly/plotly.js/pull/3991))
- Added `showEditInChartStudio` config option ([plotly/plotly.js#4061](https://github.com/plotly/plotly.js/pull/4061))

### Fixed
- Fixed incorrect facet row ordering in figures generated by plotly.express functions ([plotly/plotly_express#129](https://github.com/plotly/plotly_express/issues/129))
- Fixed "The truth value of an array with more than one element is ambiguous" error when specifying subplot titles as numpy array of strings ([#1685](https://github.com/plotly/plotly.py/pull/1685)). Special thanks to [@MrQubo](https://github.com/MrQubo) for this contribution!
- The `line_3d` plotly express function was not visible by default when importing `*` from `plotly.express` ([#1667](https://github.com/plotly/plotly.py/pull/1667/files))


## [4.0.0] - 2019-07-16

This is a major release that includes many new features, and a few breaking changes. See the [version 4 announcement](https://community.plot.ly/t/introducing-plotly-py-4-0-0rc1/25639) for a summary of the important changes.
Expand Down
8 changes: 4 additions & 4 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==4.0.0
pip install plotly==4.1.0
```

or conda.
```
conda install -c plotly plotly==4.0.0
conda install -c plotly plotly==4.1.0
```

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

# FigureWidget support
jupyter labextension install plotlywidget@1.0.0 --no-build
jupyter labextension install plotlywidget@1.1.0 --no-build

# and jupyterlab renderer support
jupyter labextension install jupyterlab-plotly@1.0.0 --no-build
jupyter labextension install jupyterlab-plotly@1.1.0 --no-build

# JupyterLab chart editor support (optional)
jupyter labextension install [email protected] --no-build
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/jupyterlab-plotly/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/javascript/jupyterlab-plotly/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab-plotly",
"version": "1.0.0",
"version": "1.1.0",
"description": "The plotly JupyterLab extension",
"author": "The plotly.py team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/plotlywidget/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/javascript/plotlywidget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlywidget",
"version": "1.0.0",
"version": "1.1.0",
"description": "The plotly JupyterLab extension",
"author": "The plotly.py team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/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__ = "^1.0.0"
__frontend_version__ = "^1.1.0"
2 changes: 0 additions & 2 deletions packages/python/plotly/plotly/express/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express
"""

__version__ = "0.3.0"

from ._chart_types import ( # noqa: F401
scatter,
scatter_3d,
Expand Down
26 changes: 18 additions & 8 deletions packages/python/plotly/plotly/express/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,18 @@ def configure_cartesian_marginal_axes(args, fig, orders):

# Add axis titles to non-marginal subplots
y_title = get_decorated_label(args, args["y"], "y")
for row in range(1, nrows):
fig.update_yaxes(title_text=y_title, row=row, col=1)
if args["marginal_x"]:
fig.update_yaxes(title_text=y_title, row=1, col=1)
else:
for row in range(1, nrows + 1):
fig.update_yaxes(title_text=y_title, row=row, col=1)

x_title = get_decorated_label(args, args["x"], "x")
for col in range(1, ncols):
fig.update_xaxes(title_text=x_title, row=1, col=col)
if args["marginal_y"]:
fig.update_xaxes(title_text=x_title, row=1, col=1)
else:
for col in range(1, ncols + 1):
fig.update_xaxes(title_text=x_title, row=1, col=col)

# Configure axis type across all x-axes
if "log_x" in args and args["log_x"]:
Expand Down Expand Up @@ -958,7 +964,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
row = m.val_map[val]
trace._subplot_row_val = val
else:
if trace_spec.marginal == "x":
if has_marginal_x and trace_spec.marginal != "x":
row = 2
else:
row = 1
Expand Down Expand Up @@ -1039,7 +1045,11 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
continue

_set_trace_grid_reference(
trace, fig.layout, fig._grid_ref, trace._subplot_row, trace._subplot_col
trace,
fig.layout,
fig._grid_ref,
nrows - trace._subplot_row + 1,
trace._subplot_col,
)

# Add traces, layout and frames to figure
Expand All @@ -1063,7 +1073,7 @@ def init_figure(
row_titles = [None] * nrows
for frame in frame_list:
for trace in frame["data"]:
row0 = nrows - trace._subplot_row
row0 = trace._subplot_row - 1
col0 = trace._subplot_col - 1

if isinstance(trace, go.Splom):
Expand Down Expand Up @@ -1122,7 +1132,7 @@ def init_figure(
specs=specs,
shared_xaxes="all",
shared_yaxes="all",
row_titles=row_titles,
row_titles=list(reversed(row_titles)),
column_titles=column_titles,
horizontal_spacing=horizontal_spacing,
vertical_spacing=vertical_spacing,
Expand Down
7 changes: 1 addition & 6 deletions packages/python/plotly/plotly/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,7 @@ def _checks(item, defaults):

if row_titles:
domains_list = []
if row_dir < 0:
rows_iter = range(rows - 1, -1, -1)
else:
rows_iter = range(rows)

for r in rows_iter:
for r in range(rows):
domain_pair = domains_grid[r][-1]
if domain_pair:
domains_list.extend(domain_pair)
Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/plotlywidget/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12569,7 +12569,7 @@ module.exports = function identity(d) { return d; };
/* 19 */
/***/ (function(module, exports) {

module.exports = {"name":"plotlywidget","version":"1.0.0","description":"The plotly JupyterLab extension","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js","style/*.*"],"scripts":{"build":"npm run build:src","build:src":"rimraf dist && tsc","clean":"rimraf dist/ && rimraf ../../python/plotly/plotlywidget/static'","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0","typescript":"~3.1.1"},"dependencies":{"plotly.js":"^1.49.1","@jupyter-widgets/base":"^2.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin.js"}}
module.exports = {"name":"plotlywidget","version":"1.1.0","description":"The plotly JupyterLab extension","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js","style/*.*"],"scripts":{"build":"npm run build:src","build:src":"rimraf dist && tsc","clean":"rimraf dist/ && rimraf ../../python/plotly/plotlywidget/static'","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0","typescript":"~3.1.1"},"dependencies":{"plotly.js":"^1.49.1","@jupyter-widgets/base":"^2.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin.js"}}

/***/ }),
/* 20 */
Expand Down