Skip to content

Releases: plotly/plotly.py

v7.1.0

Choose a tag to compare

@KoolADE85 KoolADE85 released this 15 Sep 19:15

Added

  • 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], with thanks to @lucasjamar for the contribution!
  • 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], 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 caused px.bar and other functions to pick the wrong orientation and render unexpected plots [#4291, #4344], with thanks to @Belagum for the contribution!
  • 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], 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.groupdoubleclick to 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, quiver traces [#8027]
    • Update maplibre-gl to 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_rgb function 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

Choose a tag to compare

@emilykl emilykl released this 25 Aug 17:43

Fixed

  • Fix hex_to_rgb parsing of 3-digit shorthand hexadecimal colors such as #FFF [#5662], with thanks to @genrichez for the contribution!
  • Improve px.*_map() auto-fitting behavior when zoom and center are not specified [#5686]
  • Add <!doctype html> to the to_html() template to comply with modern web standards [#5693], with thanks to @mishrakushal for the contribution!
  • Apply histfunc/z aggregation to marginal_x/marginal_y="histogram" subplots in density_heatmap/density_contour, instead of always showing raw bin counts [#3521], with thanks to @lucasjamar for the contribution!
  • Fix mpl_to_plotly silently 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, and create_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 engine argument from functions fig.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 quiver trace 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, densitymapbox trace types, the mapbox subplot, and the mapboxAccessToken config option [#7860]. Use the equivalent *map traces instead.
      • The corresponding graph_objects and Plotly Express functions have also been removed in plotly.py; use the map versions instead
    • 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 supported
      • hsv() 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-regex with country-iso-search to 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.fitbounds default from false to 'locations' [#7895]. geo subplots will now auto-fit the initial view to the trace data by default.
    • Dynamically compute center and zoom values for scattermap and densitymap traces. The initial map view will now auto-fit to the trace data by default. Add layout.map.fitbounds attribute (default 'locations') to enable or disable auto-fitting behavior [#7884, #7913]
    • Fix GeoJSON bounding-box computation for choropleth and scattergeo traces whose geometry crosses the antimeridian [#7891]

v7.0.0rc0

v7.0.0rc0 Pre-release
Pre-release

Choose a tag to compare

@emilykl emilykl released this 29 Jul 16:47

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, and create_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 engine argument from functions fig.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 ValueError when 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 quiver trace 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, densitymapbox trace types, the mapbox subplot, and the mapboxAccessToken config option [#7860]. Use the equivalent *map traces instead.
      • The corresponding graph_objects and Plotly Express functions have also been removed in plotly.py; use the map versions instead
    • 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 supported
      • hsv() 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-regex with country-iso-search to 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.fitbounds default from false to 'locations' [#7895]. geo subplots will now auto-fit the initial view to the trace data by default.
    • Dynamically compute center and zoom values for scattermap and densitymap traces. The initial map view will now auto-fit to the trace data by default. Add layout.map.fitbounds attribute (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 choropleth and scattergeo traces whose geometry crosses the antimeridian [#7891]

v6.9.0

Choose a tag to compare

@emilykl emilykl released this 09 Jul 14:53

Fixed

  • Raise a clear ValueError when 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 sendDataToCloud modebar button to sendChartToCloud, 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 scattergl error bars after toggling traces with mixed error bar visibility [#7773], with thanks to @JulienIcon for the contribution!
    • Fix geo fitbounds to choose a compact longitude range when point data straddles the antimeridian [#7837], with thanks to @SharadhNaidu for the contribution!

Full Changelog: v6.8.0...v6.9.0

v6.8.0

Choose a tag to compare

@camdecoster camdecoster released this 03 Jun 18:30

Added

  • Add optional font parameter for make_subplots [#5393], with thanks to @Zomtir for the contribution!

Fixed

  • Fix issue where user-specified color_continuous_scale was ignored when template had autocolorscale=True [#5439], with thanks to @antonymilne for the contribution!
  • Use presence of COLAB_NOTEBOOK_ID env var to enable Colab renderer instead of testing import of google.colab [#5473], with thanks to @kevineger for the contribution!
  • Fix incorrect annotation placement for add_vline, add_hline, add_vrect, and add_hrect on 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 installing plotly [#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_width to the outer wrapper div produced by to_html so 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 for graph_objects classes now returns NotImplemented to 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:
    • Add support for arrays for the pie property legendrank, so that it can be configured per slice [#7723]
    • Add hoversort layout attribute to sort unified hover label items by value [#7734]

v6.7.0

Choose a tag to compare

@camdecoster camdecoster released this 09 Apr 20:32

Added

  • Add facet_row support to px.imshow for creating subplots along an additional dimension [#5445], with thanks to @FBumann for the contribution!

Fixed

  • Update numpy.percentile syntax to stop using deprecated alias [#5483], with thanks to @Mr-Neutr0n for the contribution!
    • numpy with a version less than 1.22 is no longer supported.
  • Handle empty px.histogram by skipping None label 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 hoveranywhere and clickanywhere layout attributes to enable emitting hover and click events anywhere in the plot area, not just over traces [#7707]
    • Add displayNotifier configuration property to set the display of notifier in the top right area of the viewport [#7730]
    • Update USA location lookup for scattergeo and choropleth traces to use both location names and abbreviations [#7731]

v6.6.0

Choose a tag to compare

@emilykl emilykl released this 02 Mar 21:07

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

v6.5.2

Choose a tag to compare

@camdecoster camdecoster released this 14 Jan 21:25

Fixed

  • Fix issue where pie trace legend, showlegend attributes don't accept array values [#5464 and #5465], with thanks to @my-tien for the contribution!

v6.5.1

Choose a tag to compare

@camdecoster camdecoster released this 07 Jan 16:34

Fixed

  • Fix issue where Plotly Express ignored trace-specific color sequences defined in templates via template.data.<trace_type> [#5437], with thanks to @antonymilne for the contribution!

Updated

  • Speed up validate_gantt function [#5386], with thanks to @misrasaurabh1 for the contribution!
  • Update plotly.js from version 3.3.0 to version 3.3.1. See the plotly.js release notes for more information. [#5456]. Notable changes include:
    • Add support for arrays for the pie properties showlegend and legend, so that these can be configured per slice. [#7580]

v6.5.0

Choose a tag to compare

@emilykl emilykl released this 17 Nov 18:37

Updated

  • Update plotly.js from version 3.2.0 to version 3.3.0. See the plotly.js release notes for more information. [#5421]. Notable changes include:
    • Add hovertemplate for candlestick and ohlc traces [#7619]

Fixed

  • Fix bug where numpy datetime contained in Python list was converted to integer [#5415]

Full Changelog: v6.4.0...v6.5.0