From b57c55c7b8b07a19e319793ca0330eaa8968e916 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Thu, 3 Sep 2026 10:26:26 -0400 Subject: [PATCH 1/2] do not use full_html for google colab renderer --- plotly/io/_base_renderers.py | 2 +- tests/test_io/test_renderers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/io/_base_renderers.py b/plotly/io/_base_renderers.py index 1b56a0128b1..8d46facd48a 100644 --- a/plotly/io/_base_renderers.py +++ b/plotly/io/_base_renderers.py @@ -452,7 +452,7 @@ def __init__( ): super(ColabRenderer, self).__init__( connected=True, - full_html=True, + full_html=False, global_init=False, config=config, auto_play=auto_play, diff --git a/tests/test_io/test_renderers.py b/tests/test_io/test_renderers.py index 924b22efaec..e6591a0798a 100644 --- a/tests/test_io/test_renderers.py +++ b/tests/test_io/test_renderers.py @@ -154,7 +154,7 @@ def test_colab_renderer_show(fig1): # Check html contents html = mock_arg1["text/html"] - assert_full_html(html) + assert_not_full_html(html) assert_html_renderer_connected(html) # check kwargs From 40a623ccd37d8efdaf2d8efe8bd80abbc1f92f7f Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Thu, 3 Sep 2026 15:56:25 -0400 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7ace75f58c..09fffdbd6b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - 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! +- Fix rendering issue causing a too-large div when calling `Figure.show()` in Google Colab [[#5718](https://github.com/plotly/plotly.py/pull/5718)] ## [7.0.0] - 2026-08-25