jupyterlab-plotly
Advanced tools
Changelog
[4.13.0] - 2020-11-23
px.choropleth
, px.scatter_geo
and px.line_geo
now support faceting as well as fitbounds
and basemap_visible
2923px.scatter_geo
and px.line_geo
now support geojson
/featureidkey
input 2923px.scatter_geo
now supports symbol
2923go.Figure
now has a set_subplots
method to set subplots on an already
existing figure. 2866Turbo
colorscale and fancier swatch display functions
2882image_array_to_data_uri
has been added in
plotly.utils
, in order to transform NumPy arrays to data b64 URIs (which
can be passed to the source parameter of go.Image
, or to layout images).
2879selector
argument to updater/selector functions now accepts int
s and str
s
2894px.scatter_geo
support for text
is fixed 2923x
and y
parameters of px.imshow
are now used also in the case where
an Image trace is used (for RGB data or with binary_string=True
). However,
only numerical values are accepted (while the Heatmap trace allows date or
string values for x
and y
). 2761Changelog
[4.12.0] - 2020-10-23
add_trace
, add_shape
, add_annotation
and add_layout_image
, the row
and/or col
argument now also accept the string "all"
. row="all"
adds the object to all the subplot rows and col="all"
adds the object to all the subplot columns. (#2840)add_hline
, add_vline
, add_hrect
, add_vrect
functions, which also support the row="all"
and col="all"
arguments. (#2840)add_trace
, add_shape
, add_annotation
, add_layout_image
, add_hline
, add_vline
, add_hrect
, add_vrect
functions accept an argument exclude_empty_subplots
which if True
, only adds the object to subplots already containing traces or layout objects. This is useful in conjunction with the row="all"
and col="all"
arguments. (#2840)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 of select_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)some_fig.update_layout(geo_ltaxis_showgrid=True)
shows Bad property path:\ngeo_ltaxis_showgrid\n ^
and lists the valid properties for geo
.plotly.graph_objects
module.Changelog
[4.11.0] - 2020-10-01
plotly.graph_objects
module.Changelog
[4.10.0] - 2020-09-10
plotly.io.full_figure_for_development()
and plotly.graph_objects.Figure.full_figure_for_development()
(#2737)plotly.graph_objects
module.px.imshow
has a new binary_string
boolean argument, which passes the
image data as a b64 binary string when True. Using binary strings allow for
faster image rendering and smaller figure size. Additional optional arguments
binary_backend
, binary_format
and binary_compression_level
control
how to generate the b64 string (#2691px.imshow
has a new contrast_rescaling
argument in order to choose how
to set data values corresponding to the bounds of the color range
(#2691hover_data
(#2749)FigureWidget
(#2711) with thanks to @meffmaddfull_html()
with html=False
(#2469) with thanks to @tallamjrff.distplot()
now only computes traces that will be shown (#2730) with thanks to @akbo.hist()
works with latest version of Pandas (#2713) with thanks to @KerybasChangelog
[4.9.0] - 2020-07-16
engine
argument to plotly.io.to_image
and plotly.io.write_image
. The engine
argument may be set to "kaleido"
, "orca"
, or "auto"
. The default is engine="auto"
, in which case the Kaleido backend is enabled if the kaleido
package from PyPI is installed, otherwise Orca is used. (#2613).plotly.express.timeline()
added as an official alternative to plotly.figure_factories.create_gantt()
(#2626)create_hexbin_mapbox()
added to Figure Factories, with thanks to @RenaudLN for the impressive contribution!facet_row_spacing
and facet_col_spacing
added to Plotly Express cartesian 2d functions (#2614)base
added to Plotly Express bar
and bar_polar
functions (#2626)px.NO_COLOR
constant to override wide-form color assignment in Plotly Express (#2614)scattergl
when render_mode="webgl"
in Plotly Express (#2614)"parent"
was not accepted as part of path
for px.sunburst()
and px.treemap()
(#2640)create_dendrogram()
figure factory now works correctly with scipy
1.5.1 (#2627)imshow
, to Pandas backend with kind
option (#2541)plotly.express.imshow
now uses data frame index and columns names and values to populate axis parameters by default (#2539)package-lock.json
with many fewer security warnings (#2636)Changelog
[4.8.2] - 2020-06-26
add_traces()
now accepts bare int
-like values for rows
/cols
as well as lists thereof (#2546), with thanks to @MCBoarder289 for the contribution!row
/col
now accept int
-like values, not strictly int
values (#2451), with thanks to @MCBoarder289 for the contribution!px.sunburst
and px.treemap
with path
input (#2524)hover_data
argument of px
functions, when the column name is changed with labels and hover_data
is a dictionary setting up a specific format for the hover data (#2544).trendline
argument more robust and made it work with datetime x
values (#2554)px.sunburst
and px.treemap
: when the color
and values
arguments correspond to the same column, a different aggregation function has to be used for the two arguments (#2591)range_(x|y)
should not impact the unlinked range of marginal subplots (#2600)px.line
now sets line_group=<variable>
in wide mode by default (#2599)Changelog
[4.8.1] - 2020-05-28
plotly.colors
and plotly.express.colors
Changelog
[4.8.0] - 2020-05-26
plotly
now provides a Plotly Express-backed Pandas-compatible plotting backend, which can be activated via pandas.options.plotting.backend = "plotly"
. Note that it is not intended to implement every Pandas plotting function, nor is it intended to replicate the behaviour of every argument, although per the changes below, x
and y
should behave similarly. (#2336)plotly.express.data
: stocks
, experiment
, medals_wide
and medals_long
. (#2336)go.Figure
and go.FigureWidget
now have a _repr_html_
and a _repr_mimebundle_
method, which are standard hooks for integration in systems based on IPython. In particular, with _repr_html_
plotly figures can now be used within sphinx-gallery without any scraper. These additions should not change anything to the way plotly figures are displayed in notebook environments, since the _ipython_display_
method (already present in earlier versions) takes precedence over the new methods.x
, y
, orientation
, histfunc
, violinmode
, boxmode
and stripmode
arguments for 2d-cartesian functions in Plotly Express (i.e. scatter
, line
, area
, bar
, histogram
, violin
, box
, strip
, funnel
, density_heatmap
and density_contour
) has been refined (#2336):
x
or y
is missing, it is inferred to be the index of data_frame
if data_frame
provided, otherwise a stable index of integers starting at 0. In the case of px.bar
, if the provided value is not continuous, the missing value is treated as a column of 1s named "count", so as to behave more like px.histogram
and to avoid sizing the resulting bars differently based on their position in the column. Previously, missing values defaulted to integers starting at 0 per trace which made it potentially inconsistent or misleading.x
(y
) is missing, orientation
now defaults to v
(h
). Previously it always defaulted to v
but this is not considered a breaking change, as the cases in which it now defaults to h
caused unreadable output if set to v
.x
and y
are provided and one of them does not contain continuous values, orientation
defaults to the value perpendicular to that axis. Previously it always defaulted to v
but this is not considered a breaking change, as the cases in which it now defaults to h
caused unreadable output if set to v
.x
or y
(but not both) may now be provided as a list of column references into data_frame
or columns of data, in which case the imputed data frame will be treated as "wide" data and melt()
ed internally before applying the usual mapping rules, with function-specific defaults.x
nor y
is provided but data_frame
is, the data frame will be treated as "wide" with defaults depending on the value of orientation
(and orientation
has accordingly been added to scatter
, line
, density_heatmap
, and density_contour
for this purpose). Previously this would have resulted in an empty figure.x
and y
are provided to histogram
, and if x
, y
and z
are provided to density_heatmap
or density_contour
, then histfunc
now defaults to sum
so as to avoid ignoring the provided data, and to cause histogram
and bar
to behave more similarly.violinmode
, boxmode
and stripmode
now default to overlay
if x
(y
) in in v
(h
) orientation is also mapped to color
, to avoid strange spacing issues with the previous default of group
in all cases.color_discrete_map
, symbol_map
and line_dash_map
now accept the string "identity"
which causes the corresponding input data to be used as-is rather than mapped into color_discrete_sequence
, symbol_sequence
or line_dash_sequence
, respectively. (#2336)px.Constant
or px.Range
objects in the place of column references so as to express constant or increasing integer values. (#2336)