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