Repository navigation
Releases
Releases · plotly/plotly.py
v7.2.0
Added
- Add support for converting matplotlib reference lines (
axhline,axvline, and horizontal/verticalaxline) as well as axes-coordinate lines into Plotly layout shapes inmpl_to_plotly, including support for date axes [#5719], with thanks to @robertoffmoura for the contribution!
Changed
- Remove Python 3.8 and Python 3.9 support. plotly.py now requires Python 3.10 or later. [#5883]
Fixed
- Fix figures in JupyterLab not redrawing when their output is updated with
update_display_data(for exampleDisplayHandle.update), which also kept animations in other kernels on their first frame [#5865], with thanks to @AllenDowney for the contribution! - Fix
mpl_to_plotlytick marker mirroring, axis positioning, and trace visibility for twinned and overlaid subplots (such astwinxandtwiny) [#5310], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlylosing matplotlib axis line colors by exporting the color of each axis's displayed spine to the plotly x and y axislinecolor[#5311], with thanks to @robertoffmoura for the contribution! - Fix concurrent first access to lazily initialized graph object properties, which could raise
ValueError("Invalid value")[#5691], with thanks to @hb1915 for the contribution! - Fix
mpl_to_plotlycrashing on touching bars (such asplt.hist) due to floating-point noise producing negativebargapvalues by clampingbargapto[0, 1][#5696], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlydrawing step plots with diagonal lines instead of vertical/horizontal step segments by mapping matplotlib step drawstyles (steps-pre,steps-post,steps-mid) to plotly line shapes [#5697], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlydropping matplotlib stairs plots by renderingStepPatchartists as step lines or filled step areas from their path vertices and edge style [#5698], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlyshowing unwanted legends with placeholder or internal label entries (_nolegend_,_childN) by defaultinglayout.showlegend=Falseunless the matplotlib figure explicitly defines a legend [#5699], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlycrashing on figures with fully transparent or alpha-carrying colors, such as boxplot outlier markers (facecolor="none"), rgba line colors, andcolor="none"text and axis labels; all matplotlib colors are now exported through a single helper that maps"none"to transparent rgba and keeps or overrides alpha as matplotlib does [#5700], with thanks to @robertoffmoura for the contribution! - Fix serialization of box/lasso select data for figures with multiple subplots [#5710], with thanks to @flpi-sun for the contribution!
- Export tick label colors to the plotly tickfont in
mpl_to_plotly[#5716], with thanks to @robertoffmoura for the contribution! - Fix
convert_dashmapping dotted lines (linestyle=':') to invalid'circle'in Plotly, correctly converting them to'dot'and preserving custom dash patterns as pixel lists [#5719], with thanks to @robertoffmoura for the contribution! - Fix Plotly Express mutating lists passed to the
xoryarguments in wide mode [#5727], with thanks to @cpruijsen for the contribution! - Fix
px.sunburst,px.treemapandpx.iciclelisting sectors in a different order on every run whenpathis used with a Polars DataFrame; sectors now follow their order of first appearance for all dataframe backends [#5766], with thanks to @Irahan2 for the contribution! - Fix
trendline_scope="overall"drawing the overall trendline on themarginal_x/marginal_ysubplots as well as the main plot; it is now drawn only on the main subplots [#5780], with thanks to @jayzhou2309 for the contribution! - Fix
add_hline,add_vline,add_hrectandadd_vrectdropping the shape on an empty subplot whenrowandcolselect a single subplot [#5871], with thanks to @LukeTheoJohnson for the contribution! - Fix
mpl_to_plotlyconversion of matplotlib contour lines and line collections: close contour rings ending withZcodes, support dash styles, convert date x-axes, separate disjoint subpaths withNoneseparators, hide line collection traces from the legend by default, and group consecutive same-style lines into single traces [#5770], with thanks to @robertoffmoura for the contribution! - Fix
plotly.io.write_imagesignoringlayout.width/layout.height(and the template's) and exporting every figure at the default 700x500 size; it now uses the same width/height priority aswrite_imageandto_image[#5784], with thanks to @breken-ai for the contribution! - Fix color utilities mutating the list of colors passed to them [#5836], with thanks to @Enesuygurs for the contribution!
- Fix Plotly Express (including
px.imshow) ignoringfacet_row_spacing=0andfacet_col_spacing=0and using the default spacing between facets instead [#5881], with thanks to @rishi02102017 for the contribution!
v7.2.0rc0
Added
- Add support for converting matplotlib reference lines (
axhline,axvline, and horizontal/verticalaxline) as well as axes-coordinate lines into Plotly layout shapes inmpl_to_plotly, including support for date axes [#5719], with thanks to @robertoffmoura for the contribution!
Changed
- Remove Python 3.8 and Python 3.9 support. plotly.py now requires Python 3.10 or later. [#5883]
Fixed
- Fix figures in JupyterLab not redrawing when their output is updated with
update_display_data(for exampleDisplayHandle.update), which also kept animations in other kernels on their first frame [#5865], with thanks to @AllenDowney for the contribution! - Fix
mpl_to_plotlytick marker mirroring, axis positioning, and trace visibility for twinned and overlaid subplots (such astwinxandtwiny) [#5310], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlylosing matplotlib axis line colors by exporting the color of each axis's displayed spine to the plotly x and y axislinecolor[#5311], with thanks to @robertoffmoura for the contribution! - Fix concurrent first access to lazily initialized graph object properties, which could raise
ValueError("Invalid value")[#5691], with thanks to @hb1915 for the contribution! - Fix
mpl_to_plotlycrashing on touching bars (such asplt.hist) due to floating-point noise producing negativebargapvalues by clampingbargapto[0, 1][#5696], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlydrawing step plots with diagonal lines instead of vertical/horizontal step segments by mapping matplotlib step drawstyles (steps-pre,steps-post,steps-mid) to plotly line shapes [#5697], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlydropping matplotlib stairs plots by renderingStepPatchartists as step lines or filled step areas from their path vertices and edge style [#5698], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlyshowing unwanted legends with placeholder or internal label entries (_nolegend_,_childN) by defaultinglayout.showlegend=Falseunless the matplotlib figure explicitly defines a legend [#5699], with thanks to @robertoffmoura for the contribution! - Fix
mpl_to_plotlycrashing on figures with fully transparent or alpha-carrying colors, such as boxplot outlier markers (facecolor="none"), rgba line colors, andcolor="none"text and axis labels; all matplotlib colors are now exported through a single helper that maps"none"to transparent rgba and keeps or overrides alpha as matplotlib does [#5700], with thanks to @robertoffmoura for the contribution! - Fix serialization of box/lasso select data for figures with multiple subplots [#5710], with thanks to @flpi-sun for the contribution!
- Export tick label colors to the plotly tickfont in
mpl_to_plotly[#5716], with thanks to @robertoffmoura for the contribution! - Fix
convert_dashmapping dotted lines (linestyle=':') to invalid'circle'in Plotly, correctly converting them to'dot'and preserving custom dash patterns as pixel lists [#5719], with thanks to @robertoffmoura for the contribution! - Fix Plotly Express mutating lists passed to the
xoryarguments in wide mode [#5727], with thanks to @cpruijsen for the contribution! - Fix
px.sunburst,px.treemapandpx.iciclelisting sectors in a different order on every run whenpathis used with a Polars DataFrame; sectors now follow their order of first appearance for all dataframe backends [#5766], with thanks to @Irahan2 for the contribution! - Fix
trendline_scope="overall"drawing the overall trendline on themarginal_x/marginal_ysubplots as well as the main plot; it is now drawn only on the main subplots [#5780], with thanks to @jayzhou2309 for the contribution! - Fix
add_hline,add_vline,add_hrectandadd_vrectdropping the shape on an empty subplot whenrowandcolselect a single subplot [#5871], with thanks to @LukeTheoJohnson for the contribution! - Fix
mpl_to_plotlyconversion of matplotlib contour lines and line collections: close contour rings ending withZcodes, support dash styles, convert date x-axes, separate disjoint subpaths withNoneseparators, hide line collection traces from the legend by default, and group consecutive same-style lines into single traces [#5770], with thanks to @robertoffmoura for the contribution! - Fix
plotly.io.write_imagesignoringlayout.width/layout.height(and the template's) and exporting every figure at the default 700x500 size; it now uses the same width/height priority aswrite_imageandto_image[#5784], with thanks to @breken-ai for the contribution! - Fix color utilities mutating the list of colors passed to them [#5836], with thanks to @Enesuygurs for the contribution!
- Fix Plotly Express (including
px.imshow) ignoringfacet_row_spacing=0andfacet_col_spacing=0and using the default spacing between facets instead [#5881], with thanks to @rishi02102017 for the contribution!
v7.1.0
Added
- Support
marginal_x/marginal_y="heatmap"indensity_heatmap, drawing a single-row/column heatmap strip in the margin colored by the samez/histfuncaggregate as the main plot and sharing its color scale [#5706], with thanks to @lucasjamar for the contribution! - Add support for custom tick values in
mpl_to_plotlywhen the matplotlib tick positions don't follow an arithmetic progression, including custom tick labels and tick values on date axes [#5262], with thanks to @robertoffmoura for the contribution!
Fixed
- Fix Plotly Express treating unsigned integer columns (
uint8,uint16,uint32,uint64) in pandas DataFrames as categorical, which causedpx.barand other functions to pick the wrong orientation and render unexpected plots [#4291, #4344], with thanks to @Belagum for the contribution! - Fix
mpl_to_plotlynot settingpaper_bgcolorandplot_bgcolorfrom the matplotlib figure and axes backgrounds, so converted figures match the source figure's background colors [#5285], with thanks to @robertoffmoura for the contribution! - Fix rendering issue causing a too-large div when calling
Figure.show()in Google Colab [#5718] - 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], with thanks to @larsoner for the contribution!- The scaper now warns once (instead of failing the build) when static image export is unavailable
- The sphinx-gallery scraper no longer scrapes files belonging to other examples during parallel builds [#5701], with thanks to @larsoner for the contribution!
Updated
- Update plotly.js from version 4.0.0 to version 4.1.1 [#5722, #5730]. See the plotly.js release notes for v4.1.0 and v4.1.1 for details. Notable changes include:
- Add an opt-in modebar button for downloading Plotly figures as JSON [#7990, #8022]
- Add
legend.groupdoubleclickto set the group behavior for a legend double-click [#7997] - Increase default double-click delay threshold to 500ms (from 300) [#8014]
- Fix issue with per-point marker color for hover labels in
scattergl,quivertraces [#8027] - Update
maplibre-glto v6 to address CVE-2026-85061 [#8035]- Note: Safari 15, Chrome 56, Firefox 51 and later are now required for map traces
- Update
hex_to_rgbfunction to raise error for invalid-length hex codes, and emit warning for hex codes containing alpha [#5729], with thanks to @dylanpulver for the contribution!
v7.0.0
Fixed
- Fix
hex_to_rgbparsing of 3-digit shorthand hexadecimal colors such as#FFF[#5662], with thanks to @genrichez for the contribution! - Improve
px.*_map()auto-fitting behavior whenzoomandcenterare not specified [#5686] - Add
<!doctype html>to theto_html()template to comply with modern web standards [#5693], with thanks to @mishrakushal for the contribution! - Apply
histfunc/zaggregation tomarginal_x/marginal_y="histogram"subplots indensity_heatmap/density_contour, instead of always showing raw bin counts [#3521], with thanks to @lucasjamar for the contribution! - Fix
mpl_to_plotlysilently dropping matplotlib path collections in data coordinates (such as violin plots, pcolor, event plots, stack plots, fill_between, and stem plots) by rendering them as filled polygons or lines [#5702], with thanks to @robertoffmoura for the contribution!
Removed
- Remove the deprecated Figure Factory functions
create_2d_density,create_annotated_heatmap,create_bullet,create_candlestick,create_choropleth,create_distplot,create_facet_grid,create_gantt,create_hexbin_mapbox,create_ohlc,create_scatterplotmatrix, andcreate_violin[#5627] - Remove support for Kaleido versions less than v1.0.0 for static image generation [#5677]
- Remove support for Orca for static image generation [#5677]
- Remove
engineargument from functionsfig.write_image(),fig.to_image(),pio.write_image(),pio.write_images(),pio.to_image(),pio.full_figure_for_development(), and from renderer constructors [#5677]
Updated
- Update plotly.js from version 3.6.0 to version 4.0.0 [#5673]. This is a major-version release with many changes. See the plotly.js release notes for the full list. The most significant changes include:
- Add
quivertrace type to visualize vector fields using arrows [#7710, #7945] - Add "Share Chart" modebar button for generating a chart-sharing link via Plotly Cloud [#7909]
- Remove
scattermapbox,choroplethmapbox,densitymapboxtrace types, themapboxsubplot, and themapboxAccessTokenconfig option [#7860]. Use the equivalent*maptraces instead.- The corresponding
graph_objectsand Plotly Express functions have also been removed in plotly.py; use themapversions instead
- The corresponding
- Drop support for MathJax v2, and add support for v4 [#7898]. MathJax is the JavaScript library used for rendering mathematical equations in plotly charts.
- Switch color processing library from TinyColor to culori [#7536, #7962]. There are some changes to supported color string formats as a result:
rgb()/rgba()strings with decimal 0–1 fractions are no longer supportedhsv()color strings are no longer supported- Strings with invalid syntax such as
hsl(120, 50% 50%)are no longer supported - New supported formats:
'#ff0000aa','#f00a','rgb(255 0 0)','rgba(255 0 0 / 0.5)','hsl(0 100% 50% / 0.5)','hsla(0, 100%, 50%, 0.5)','hwb(0, 0%, 0%)',lab(),lch(),oklab(),oklch(),color(),hsl(0.5turn 60% 40%),hsl(none 60% 40%)
- Replace
country-regexwithcountry-iso-searchto search for country names in choropleth, scattergeo traces [#7856]. Most country names are handled exactly the same; a small number of legacy entries have been removed. - Change
layout.geo.fitboundsdefault fromfalseto'locations'[#7895].geosubplots will now auto-fit the initial view to the trace data by default. - Dynamically compute
centerandzoomvalues forscattermapanddensitymaptraces. The initial map view will now auto-fit to the trace data by default. Addlayout.map.fitboundsattribute (default'locations') to enable or disable auto-fitting behavior [#7884, #7913] - Fix GeoJSON bounding-box computation for
choroplethandscattergeotraces whose geometry crosses the antimeridian [#7891]
- Add
v7.0.0rc0
Removed
- Remove the deprecated Figure Factory functions
create_2d_density,create_annotated_heatmap,create_bullet,create_candlestick,create_choropleth,create_distplot,create_facet_grid,create_gantt,create_hexbin_mapbox,create_ohlc,create_scatterplotmatrix, andcreate_violin[#5627] - Remove support for Kaleido versions less than v1.0.0 for static image generation [#5677]
- Remove support for Orca for static image generation [#5677]
- Remove
engineargument from functionsfig.write_image(),fig.to_image(),pio.write_image(),pio.write_images(),pio.to_image(),pio.full_figure_for_development(), and from renderer constructors [#5677]
Fixed
- Raise a clear
ValueErrorwhen an unsupported marginal plot type is passed to Plotly Express, instead of failing later with a cryptic'NoneType' object has no attribute 'constructor'message [#5625], with thanks to @eugen-goebel for the contribution!
Updated
- Update plotly.js from version 3.6.0 to version 4.0.0-rc.0 [#5673]. This is a major-version release candidate with many changes. See the plotly.js release notes for the full list. The most significant changes include:
- Add
quivertrace type to visualize vector fields using arrows [#7710], with thanks to @degzhaus for the contribution! - Add "Share Chart" modebar button for generating a chart-sharing link via Plotly Cloud [#7909]
- Remove
scattermapbox,choroplethmapbox,densitymapboxtrace types, themapboxsubplot, and themapboxAccessTokenconfig option [#7860]. Use the equivalent*maptraces instead.- The corresponding
graph_objectsand Plotly Express functions have also been removed in plotly.py; use themapversions instead
- The corresponding
- Drop support for MathJax v2, and add support for v4 [#7898]. MathJax is the JavaScript library used for rendering mathematical equations in plotly charts.
- Switch color processing library from TinyColor to color [#7536]. There are some changes to supported color string formats as a result:
rgb()/rgba()strings with decimal 0–1 fractions are no longer supportedhsv()color strings are no longer supported- New supported formats:
'#ff0000aa','#f00a','rgb(255 0 0)','rgba(255 0 0 / 0.5)','hsl(0 100% 50% / 0.5)','hsla(0, 100%, 50%, 0.5)','hwb(0, 0%, 0%)'
- Replace
country-regexwithcountry-iso-searchto search for country names in choropleth, scattergeo traces [#7856]. Most country names are handled exactly the same; a small number of legacy entries have been removed. - Change
layout.geo.fitboundsdefault fromfalseto'locations'[#7895].geosubplots will now auto-fit the initial view to the trace data by default. - Dynamically compute
centerandzoomvalues forscattermapanddensitymaptraces. The initial map view will now auto-fit to the trace data by default. Addlayout.map.fitboundsattribute (default'locations') to enable or disable auto-fitting behavior [#7884, #7913], with thanks to @palmerusaf and @DhruvGarg111 for the contributions! - Fix GeoJSON bounding-box computation for
choroplethandscattergeotraces whose geometry crosses the antimeridian [#7891]
- Add
v6.9.0
Fixed
- Raise a clear
ValueErrorwhen an unsupported marginal plot type is passed to Plotly Express, instead of failing later with a cryptic'NoneType' object has no attribute 'constructor'message [#5625], with thanks to @eugen-goebel for the contribution!
Updated
- Update plotly.js from version 3.6.0 to version 3.7.0. See the plotly.js release notes for more information [#5639]. Notable changes include:
- Rename
sendDataToCloudmodebar button tosendChartToCloud, and update to upload chart to Plotly Cloud [#7802, #7852, #7854]. NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload. - Fix stale
scatterglerror bars after toggling traces with mixed error bar visibility [#7773], with thanks to @JulienIcon for the contribution! - Fix geo
fitboundsto choose a compact longitude range when point data straddles the antimeridian [#7837], with thanks to @SharadhNaidu for the contribution!
- Rename
Full Changelog: v6.8.0...v6.9.0
v6.8.0
Added
Fixed
- Fix issue where user-specified
color_continuous_scalewas ignored when template hadautocolorscale=True[#5439], with thanks to @antonymilne for the contribution! - Use presence of
COLAB_NOTEBOOK_IDenv var to enable Colab renderer instead of testing import ofgoogle.colab[#5473], with thanks to @kevineger for the contribution! - Fix incorrect annotation placement for
add_vline,add_hline,add_vrect, andadd_hrecton datetime axes [#5508], with thanks to @mosh3eb for the contribution! - Update tests to be compatible with numpy 2.4 [#5522], with thanks to @thunze for the contribution!
- Fix issue where
js/directory was unintentionally installed as a top-level Python package when installingplotly[#5587] - Add default headers to be passed in to Kaleido v1.3.0 to avoid blocked Open Street Map tiles [#5588]
- Propagate the requested
default_height/default_widthto the outer wrapper div produced byto_htmlso that responsive (percentage) dimensions inherit from a sized parent container instead of collapsing to the plotly.js 450px fallback [#5591], with thanks to @SharadhNaidu for the contribution!
Updated
- The
__eq__method forgraph_objectsclasses now returnsNotImplementedto give the other operand an opportunity to handle the comparison [#5547], with thanks to @RazerM for the contribution! - Update plotly.js from version 3.5.0 to version 3.6.0. See the plotly.js release notes for more information [#5608]. Notable changes include:
v6.7.0
Added
- Add
facet_rowsupport topx.imshowfor creating subplots along an additional dimension [#5445], with thanks to @FBumann for the contribution!
Fixed
- Update
numpy.percentilesyntax to stop using deprecated alias [#5483], with thanks to @Mr-Neutr0n for the contribution!numpywith a version less than 1.22 is no longer supported.
- Handle empty
px.histogramby skippingNonelabel in hover template [#5535], with thanks to @tysoncung for the contribution!
Updated
- Update plotly.js from version 3.4.0 to version 3.5.0. See the plotly.js release notes for more information. [#5565]. Notable changes include:
- Add
hoveranywhereandclickanywherelayout attributes to enable emitting hover and click events anywhere in the plot area, not just over traces [#7707] - Add
displayNotifierconfiguration property to set the display of notifier in the top right area of the viewport [#7730] - Update USA location lookup for
scattergeoandchoroplethtraces to use both location names and abbreviations [#7731]
- Add
v6.6.0
Fixed
- Remove unneeded
type="text/javascript"attribute from<style>tag [#5454], with thanks to @hannob for the contribution! - Remove global warning format side effect [#5481], with thanks to @emmanuel-ferdman for the contribution!
- Fix spurious engine deprecation warning in write_image [#5517], with thanks to @mosh3eb for the contribution!
Updated
- Update plotly.js from version 3.3.1 to version 3.4.0. See the plotly.js release notes for more information. [#5527]. Notable changes include:
- Add support for clicking legend titles to toggle visibility of all traces in legend [#7698]
- Add support for shapes to reference multiple axes [#7666]
- Add support for dashed marker lines in scatter plots [#7673]
- Increase axis autorange when bar charts have outside text labels, to avoid labels being clipped [#7675]
Full Changelog: v6.5.2...v6.6.0