diff --git a/CHANGELOG.md b/CHANGELOG.md index 11e11aa06cf..96a8262d980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index 580a2326d8f..b5f9274e471 100644 --- a/README.md +++ b/README.md @@ -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 @@ -126,10 +126,10 @@ set NODE_OPTIONS=--max-old-space-size=4096 jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.0 --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 jupyterlab-chart-editor@1.2 --no-build diff --git a/packages/javascript/jupyterlab-plotly/package-lock.json b/packages/javascript/jupyterlab-plotly/package-lock.json index 8339a63731e..43298c597d8 100644 --- a/packages/javascript/jupyterlab-plotly/package-lock.json +++ b/packages/javascript/jupyterlab-plotly/package-lock.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-plotly", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/javascript/jupyterlab-plotly/package.json b/packages/javascript/jupyterlab-plotly/package.json index 07267f52864..86ff503fc5c 100644 --- a/packages/javascript/jupyterlab-plotly/package.json +++ b/packages/javascript/jupyterlab-plotly/package.json @@ -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", diff --git a/packages/javascript/plotlywidget/package-lock.json b/packages/javascript/plotlywidget/package-lock.json index cfff10f2db0..18893e6d22f 100644 --- a/packages/javascript/plotlywidget/package-lock.json +++ b/packages/javascript/plotlywidget/package-lock.json @@ -1,6 +1,6 @@ { "name": "plotlywidget", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/javascript/plotlywidget/package.json b/packages/javascript/plotlywidget/package.json index 269820e3124..2ee22c55e6b 100644 --- a/packages/javascript/plotlywidget/package.json +++ b/packages/javascript/plotlywidget/package.json @@ -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", diff --git a/packages/python/plotly/plotly/_widget_version.py b/packages/python/plotly/plotly/_widget_version.py index b7943be5c9d..593e93e6fd6 100644 --- a/packages/python/plotly/plotly/_widget_version.py +++ b/packages/python/plotly/plotly/_widget_version.py @@ -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" diff --git a/packages/python/plotly/plotly/express/__init__.py b/packages/python/plotly/plotly/express/__init__.py index 21848cb4283..19aa4bb3e51 100644 --- a/packages/python/plotly/plotly/express/__init__.py +++ b/packages/python/plotly/plotly/express/__init__.py @@ -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, diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py index c5a46b561d3..69b3c9ac382 100644 --- a/packages/python/plotly/plotly/express/_core.py +++ b/packages/python/plotly/plotly/express/_core.py @@ -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"]: @@ -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 @@ -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 @@ -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): @@ -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, diff --git a/packages/python/plotly/plotly/subplots.py b/packages/python/plotly/plotly/subplots.py index 6af054941d4..bd869ad249f 100644 --- a/packages/python/plotly/plotly/subplots.py +++ b/packages/python/plotly/plotly/subplots.py @@ -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) diff --git a/packages/python/plotly/plotlywidget/static/index.js b/packages/python/plotly/plotlywidget/static/index.js index 43faa3e37cc..ceea30dfc82 100644 --- a/packages/python/plotly/plotlywidget/static/index.js +++ b/packages/python/plotly/plotlywidget/static/index.js @@ -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 */