See the full release announcement at https://community.plotly.com/t/announcing-plotly-py-4-12-horizontal-and-vertical-lines-and-rectangles/46783
Added
- For
add_trace
,add_shape
,add_annotation
andadd_layout_image
, therow
and/orcol
argument now also accept the string"all"
.row="all"
adds the object to all the subplot rows andcol="all"
adds the object to all the subplot columns. (#2840) - Shapes that reference the plot axes in one dimension and the data in another dimension can be added with the new
add_hline
,add_vline
,add_hrect
,add_vrect
functions, which also support therow="all"
andcol="all"
arguments. (#2840) - The
add_trace
,add_shape
,add_annotation
,add_layout_image
,add_hline
,add_vline
,add_hrect
,add_vrect
functions accept an argumentexclude_empty_subplots
which ifTrue
, only adds the object to subplots already containing traces or layout objects. This is useful in conjunction with therow="all"
andcol="all"
arguments. (#2840) - For all
go.Figure
functions accepting a selector argument (e.g.,select_traces
), this argument can now also be a function which is passed each relevant graph object (in the case ofselect_traces
, it is passed every trace in the figure). For graph objects where this function returns true, the graph object is included in the selection. (#2844)
Updated
- Updated Plotly.js to version 1.57.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module.