Skip to content

Commit 5e12eb4

Browse files
authored
Merge branch 'main' into main
2 parents 4023a5d + 05579b0 commit 5e12eb4

13 files changed

Lines changed: 1530 additions & 1432 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
8+
## [7.1.0] - 2026-09-15
9+
710
### Added
811
- Support `marginal_x`/`marginal_y="heatmap"` in `density_heatmap`, drawing a single-row/column heatmap strip in the margin colored by the same `z`/`histfunc` aggregate as the main plot and sharing its color scale [[#5706](https://github.com/plotly/plotly.py/issues/5706)], with thanks to @lucasjamar for the contribution!
912
- Add support for custom tick values in `mpl_to_plotly` when the matplotlib tick positions don't follow an arithmetic progression, including custom tick labels and tick values on date axes [[#5262](https://github.com/plotly/plotly.py/pull/5262)], with thanks to @robertoffmoura for the contribution!
1013

1114
### Fixed
15+
- Fix Plotly Express treating unsigned integer columns (`uint8`, `uint16`, `uint32`, `uint64`) in pandas DataFrames as categorical, which caused `px.bar` and other functions to pick the wrong orientation and render unexpected plots [[#4291](https://github.com/plotly/plotly.py/issues/4291), [#4344](https://github.com/plotly/plotly.py/issues/4344)], with thanks to @Belagum for the contribution!
1216
- Fix `mpl_to_plotly` not setting `paper_bgcolor` and `plot_bgcolor` from the matplotlib figure and axes backgrounds, so converted figures match the source figure's background colors [[#5285](https://github.com/plotly/plotly.py/pull/5285)], with thanks to @robertoffmoura for the contribution!
1317
- Fix rendering issue causing a too-large div when calling `Figure.show()` in Google Colab [[#5718](https://github.com/plotly/plotly.py/pull/5718)]
1418
- Fix the sphinx-gallery scraper so that it generates thumbnails for figures shown with `fig.show()` or displayed as the last expression of a code block [[#5701](https://github.com/plotly/plotly.py/pull/5701)], with thanks to @larsoner for the contribution!
@@ -23,6 +27,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2327
- Fix issue with per-point marker color for hover labels in `scattergl`, `quiver` traces [[#8027](https://github.com/plotly/plotly.js/pull/8027)]
2428
- Update `maplibre-gl` to v6 to address [CVE-2026-85061](https://github.com/advisories/GHSA-jrc7-96c5-q579) [[#8035](https://github.com/plotly/plotly.js/pull/8035)]
2529
- Note: Safari 15, Chrome 56, Firefox 51 and later are now required for map traces
30+
- Update `hex_to_rgb` function to raise error for invalid-length hex codes, and emit warning for hex codes containing alpha [[#5729](https://github.com/plotly/plotly.py/pull/5729)], with thanks to @dylanpulver for the contribution!
2631

2732
### Fixed
2833
- Fix `FigureWidget` state synchronization bug where frontend modifications to array properties (like `layout.shapes`) failed to properly update the Python property cache and occasionally surfaced `Undefined` objects [[#5689](https://github.com/plotly/plotly.py/issues/5689)]

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors:
99
- family-names: "Parmer"
1010
given-names: "Chris"
1111
title: "An interactive, open-source, and browser-based graphing library for Python"
12-
version: 7.0.0
12+
version: 7.1.0
1313
doi: 10.5281/zenodo.14503524
14-
date-released: 2026-08-25
14+
date-released: 2026-09-15
1515
url: "https://github.com/plotly/plotly.py"

RELEASE.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,27 @@
55

66
This is the release process for releasing plotly.py version `X.Y.Z`, including changelogs, GitHub release and forum announcement.
77

8+
### Prerequisites
9+
10+
Ensure you have the following installed:
11+
12+
* `uv>=0.12.15`
13+
* `twine>=7.0.0`
14+
* A virtual environment: `uv venv`
15+
16+
### Prepare local environment
17+
18+
* `git switch main && git pull`
19+
* `git status`: ensure your working tree is clean
20+
* `uv pip install -e ".[dev_optional]"`
21+
* `cd js && npm ci && cd ..`
22+
823
### Finalize changelog
924

1025
Review the contents of `CHANGELOG.md` under the **Unreleased** header. We try to follow
1126
the [keepachangelog](https://keepachangelog.com/en/1.0.0/) guidelines.
1227

13-
**Note: You don't need to update the header itself with the new version number,
28+
**Note: You don't need to update the "Unreleased" header with the new version number,
1429
as that will be done automatically as part of the next step.**
1530

1631
Use the `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, and `Security`
@@ -44,7 +59,7 @@ a link to the plotly.js CHANGELOG.
4459

4560
- Commit and push the changed files to the release branch:
4661
```sh
47-
$ git add -u
62+
$ git add -A
4863
$ git commit -m "version changes for vX.Y.Z"
4964
$ git push
5065
```
@@ -117,6 +132,7 @@ You must first install [Twine](https://pypi.org/project/twine/) (`pip install tw
117132
Publishing to PyPI:
118133
```bash
119134
(plotly_dev) $ cd path/to/output
135+
(plotly_dev) $ twine check plotly-X.Y.Z*
120136
(plotly_dev) $ twine upload plotly-X.Y.Z*
121137
```
122138

_plotly_utils/colors/__init__.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676

7777
import decimal
7878
from numbers import Number
79+
from warnings import warn
7980

8081
from _plotly_utils import exceptions
8182

@@ -763,15 +764,29 @@ def hex_to_rgb(value):
763764
'#FFF' --> (255, 255, 255)
764765
765766
"""
767+
768+
input_value = value
766769
value = value.lstrip("#")
767770
if len(value) == 3:
768771
value = "".join(c * 2 for c in value)
769-
hex_total_length = len(value)
770-
rgb_section_length = hex_total_length // 3
771-
return tuple(
772-
int(value[i : i + rgb_section_length], 16)
773-
for i in range(0, hex_total_length, rgb_section_length)
774-
)
772+
elif len(value) == 4:
773+
warn(
774+
"4-character hex color provided; 4th character will be ignored."
775+
"got {!r}".format(input_value)
776+
)
777+
value = "".join(c * 2 for c in value)[:6]
778+
elif len(value) == 8:
779+
warn(
780+
"8-character hex color provided; last two characters will be ignored."
781+
"got {!r}".format(input_value)
782+
)
783+
value = value[:6]
784+
elif len(value) != 6:
785+
raise ValueError(
786+
"hex color must be 3 or 6 hex digits, optionally prefixed with "
787+
"'#'; got {!r}".format(input_value)
788+
)
789+
return tuple(int(value[i : i + 2], 16) for i in range(0, 6, 2))
775790

776791

777792
def colorscale_to_colors(colorscale):

js/package-lock.json

Lines changed: 59 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jupyterlab-plotly",
33
"main": "lib/mimeExtension.js",
4-
"version": "7.0.0",
4+
"version": "7.1.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/plotly/plotly.py"

plotly/express/_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _is_continuous(df: nw.DataFrame, col_name: str) -> bool:
149149
# fastpath for pandas: Narwhals' Series.dtype has a bit of overhead, as it
150150
# tries to distinguish between true "object" columns, and "string" columns
151151
# disguised as "object". But here, we deal with neither.
152-
return df_native[col_name].dtype.kind in "ifc"
152+
return df_native[col_name].dtype.kind in "iufc"
153153
return df.get_column(col_name).dtype.is_numeric()
154154

155155

plotly/labextension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jupyterlab-plotly",
33
"main": "lib/mimeExtension.js",
4-
"version": "7.0.0",
4+
"version": "7.1.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/plotly/plotly.py"
@@ -33,7 +33,7 @@
3333
"outputDir": "../plotly/labextension",
3434
"webpackConfig": "./webpack.config.js",
3535
"_build": {
36-
"load": "static/remoteEntry.9e3b944395b758da.js",
36+
"load": "static/remoteEntry.1dda3c8f6e5cd2a3.js",
3737
"mimeExtension": "./mimeExtension"
3838
}
3939
}

0 commit comments

Comments
 (0)