PlotlyWidget

class PlotlyWidget(**kwargs)[source]

A wrapper around the Plotly widget class.

Create a new :class:FigureWidget instance

Parameters
  • data

    The ‘data’ property is a tuple of trace instances that may be specified as:

    • A list or tuple of trace instances (e.g. [Scatter(…), Bar(…)])

    • A single trace instance (e.g. Scatter(…), Bar(…), etc.)

    • A list or tuple of dicts of string/value properties where: - The ‘type’ property specifies the trace type

      One of: [‘area’, ‘bar’, ‘barpolar’, ‘box’,

      ’candlestick’, ‘carpet’, ‘choropleth’, ‘choroplethmapbox’, ‘cone’, ‘contour’, ‘contourcarpet’, ‘densitymapbox’, ‘funnel’, ‘funnelarea’, ‘heatmap’, ‘heatmapgl’, ‘histogram’, ‘histogram2d’, ‘histogram2dcontour’, ‘image’, ‘indicator’, ‘isosurface’, ‘mesh3d’, ‘ohlc’, ‘parcats’, ‘parcoords’, ‘pie’, ‘pointcloud’, ‘sankey’, ‘scatter’, ‘scatter3d’, ‘scattercarpet’, ‘scattergeo’, ‘scattergl’, ‘scattermapbox’, ‘scatterpolar’, ‘scatterpolargl’, ‘scatterternary’, ‘splom’, ‘streamtube’, ‘sunburst’, ‘surface’, ‘table’, ‘treemap’, ‘violin’, ‘volume’, ‘waterfall’]

      • All remaining properties are passed to the constructor of the specified trace type

      (e.g. [{‘type’: ‘scatter’, …}, {‘type’: ‘bar, …}])

  • layout

    The ‘layout’ property is an instance of Layout that may be specified as:

    • An instance of plotly.graph_objs.Layout

    • A dict of string/value properties that will be passed to the Layout constructor

      Supported dict properties:

      activeshape

      :class:`plotly.graph_objects.layout.Activeshape ` instance or dict with compatible properties

      angularaxis

      :class:`plotly.graph_objects.layout.AngularAxis ` instance or dict with compatible properties

      annotations

      A tuple of plotly.graph_objects.layout.Annotation instances or dicts with compatible properties

      annotationdefaults

      When used in a template (as layout.template.layout.annotationdefaults), sets the default property values to use for elements of layout.annotations

      autosize

      Determines whether or not a layout width or height that has been left undefined by the user is initialized on each relayout. Note that, regardless of this attribute, an undefined layout width or height is always initialized on the first call to plot.

      autotypenumbers

      Using “strict” a numeric string in trace data is not converted to a number. Using convert types a numeric string in trace data may be treated as a number during automatic axis type detection. This is the default value; however it could be overridden for individual axes.

      bargap

      Sets the gap (in plot fraction) between bars of adjacent location coordinates.

      bargroupgap

      Sets the gap (in plot fraction) between bars of the same location coordinate.

      barmode

      Determines how bars at the same location coordinate are displayed on the graph. With “stack”, the bars are stacked on top of one another With “relative”, the bars are stacked on top of one another, with negative values below the axis, positive values above With “group”, the bars are plotted next to one another centered around the shared location. With “overlay”, the bars are plotted over one another, you might need to an “opacity” to see multiple bars.

      barnorm

      Sets the normalization for bar traces on the graph. With “fraction”, the value of each bar is divided by the sum of all values at that location coordinate. “percent” is the same but multiplied by 100 to show percentages.

      boxgap

      Sets the gap (in plot fraction) between boxes of adjacent location coordinates. Has no effect on traces that have “width” set.

      boxgroupgap

      Sets the gap (in plot fraction) between boxes of the same location coordinate. Has no effect on traces that have “width” set.

      boxmode

      Determines how boxes at the same location coordinate are displayed on the graph. If “group”, the boxes are plotted next to one another centered around the shared location. If “overlay”, the boxes are plotted over one another, you might need to set “opacity” to see them multiple boxes. Has no effect on traces that have “width” set.

      calendar

      Sets the default calendar system to use for interpreting and displaying dates throughout the plot.

      clickmode

      Determines the mode of single click interactions. “event” is the default value and emits the plotly_click event. In addition this mode emits the plotly_selected event in drag modes “lasso” and “select”, but with no event data attached (kept for compatibility reasons). The “select” flag enables selecting single data points via click. This mode also supports persistent selections, meaning that pressing Shift while clicking, adds to / subtracts from an existing selection. “select” with hovermode: “x” can be confusing, consider explicitly setting hovermode: “closest” when using this feature. Selection events are sent accordingly as long as “event” flag is set as well. When the “event” flag is missing, plotly_click and plotly_selected events are not fired.

      coloraxis

      plotly.graph_objects.layout.Coloraxis instance or dict with compatible properties

      colorscale

      plotly.graph_objects.layout.Colorscale instance or dict with compatible properties

      colorway

      Sets the default trace colors.

      computed

      Placeholder for exporting automargin-impacting values namely margin.t, margin.b, margin.l and margin.r in “full-json” mode.

      datarevision

      If provided, a changed value tells Plotly.react that one or more data arrays has changed. This way you can modify arrays in- place rather than making a complete new copy for an incremental change. If NOT provided, Plotly.react assumes that data arrays are being treated as immutable, thus any data array with a different identity from its predecessor contains new data.

      direction

      Legacy polar charts are deprecated! Please switch to “polar” subplots. Sets the direction corresponding to positive angles in legacy polar charts.

      dragmode

      Determines the mode of drag interactions. “select” and “lasso” apply only to scatter traces with markers or text. “orbit” and “turntable” apply only to 3D scenes.

      editrevision

      Controls persistence of user-driven changes in editable: true configuration, other than trace names and axis titles. Defaults to layout.uirevision.

      extendfunnelareacolors

      If true, the funnelarea slice colors (whether given by funnelareacolorway or inherited from colorway) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set false to disable. Colors provided in the trace, using marker.colors, are never extended.

      extendpiecolors

      If true, the pie slice colors (whether given by piecolorway or inherited from colorway) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set false to disable. Colors provided in the trace, using marker.colors, are never extended.

      extendsunburstcolors

      If true, the sunburst slice colors (whether given by sunburstcolorway or inherited from colorway) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set false to disable. Colors provided in the trace, using marker.colors, are never extended.

      extendtreemapcolors

      If true, the treemap slice colors (whether given by treemapcolorway or inherited from colorway) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set false to disable. Colors provided in the trace, using marker.colors, are never extended.

      font

      Sets the global font. Note that fonts used in traces and other layout components inherit from the global font.

      funnelareacolorway

      Sets the default funnelarea slice colors. Defaults to the main colorway used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see extendfunnelareacolors.

      funnelgap

      Sets the gap (in plot fraction) between bars of adjacent location coordinates.

      funnelgroupgap

      Sets the gap (in plot fraction) between bars of the same location coordinate.

      funnelmode

      Determines how bars at the same location coordinate are displayed on the graph. With “stack”, the bars are stacked on top of one another With “group”, the bars are plotted next to one another centered around the shared location. With “overlay”, the bars are plotted over one another, you might need to an “opacity” to see multiple bars.

      geo

      plotly.graph_objects.layout.Geo instance or dict with compatible properties

      grid

      plotly.graph_objects.layout.Grid instance or dict with compatible properties

      height

      Sets the plot’s height (in px).

      hiddenlabels

      hiddenlabels is the funnelarea & pie chart analog of visible:’legendonly’ but it can contain many labels, and can simultaneously hide slices from several pies/funnelarea charts

      hiddenlabelssrc

      Sets the source reference on Chart Studio Cloud for hiddenlabels .

      hidesources

      Determines whether or not a text link citing the data source is placed at the bottom-right cored of the figure. Has only an effect only on graphs that have been generated via forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise).

      hoverdistance

      Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no looking for data). This is only a real distance for hovering on point-like objects, like scatter points. For area-like objects (bars, scatter fills, etc) hovering is on inside the area and off outside, but these objects will not supersede hover on point-like objects in case of conflict.

      hoverlabel

      plotly.graph_objects.layout.Hoverlabel instance or dict with compatible properties

      hovermode

      Determines the mode of hover interactions. If “closest”, a single hoverlabel will appear for the “closest” point within the hoverdistance. If “x” (or “y”), multiple hoverlabels will appear for multiple points at the “closest” x- (or y-) coordinate within the hoverdistance, with the caveat that no more than one hoverlabel will appear per trace. If x unified (or y unified), a single hoverlabel will appear multiple points at the closest x- (or y-) coordinate within the hoverdistance with the caveat that no more than one hoverlabel will appear per trace. In this mode, spikelines are enabled by default perpendicular to the specified axis. If false, hover interactions are disabled. If clickmode includes the “select” flag, hovermode defaults to “closest”. If clickmode lacks the “select” flag, it defaults to “x” or “y” (depending on the trace’s orientation value) for plots based on cartesian coordinates. For anything else the default value is “closest”.

      images

      A tuple of plotly.graph_objects.layout.Image instances or dicts with compatible properties

      imagedefaults

      When used in a template (as layout.template.layout.imagedefaults), sets the default property values to use for elements of layout.images

      legend

      plotly.graph_objects.layout.Legend instance or dict with compatible properties

      mapbox

      plotly.graph_objects.layout.Mapbox instance or dict with compatible properties

      margin

      plotly.graph_objects.layout.Margin instance or dict with compatible properties

      meta

      Assigns extra meta information that can be used in various text attributes. Attributes such as the graph, axis and colorbar title.text, annotation text trace.name in legend items, rangeselector, updatemenus and sliders label text all support meta. One can access meta fields using template strings: %{meta[i]} where i is the index of the meta item in question. meta can also be an object for example {key: value} which can be accessed %{meta[key]}.

      metasrc

      Sets the source reference on Chart Studio Cloud for meta .

      modebar

      plotly.graph_objects.layout.Modebar instance or dict with compatible properties

      newshape

      plotly.graph_objects.layout.Newshape instance or dict with compatible properties

      orientation

      Legacy polar charts are deprecated! Please switch to “polar” subplots. Rotates the entire polar by the given angle in legacy polar charts.

      paper_bgcolor

      Sets the background color of the paper where the graph is drawn.

      piecolorway

      Sets the default pie slice colors. Defaults to the main colorway used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see extendpiecolors.

      plot_bgcolor

      Sets the background color of the plotting area in-between x and y axes.

      polar

      plotly.graph_objects.layout.Polar instance or dict with compatible properties

      radialaxis

      plotly.graph_objects.layout.RadialAxis instance or dict with compatible properties

      scene

      plotly.graph_objects.layout.Scene instance or dict with compatible properties

      selectdirection

      When dragmode is set to “select”, this limits the selection of the drag to horizontal, vertical or diagonal. “h” only allows horizontal selection, “v” only vertical, “d” only diagonal and “any” sets no limit.

      selectionrevision

      Controls persistence of user-driven changes in selected points from all traces.

      separators

      Sets the decimal and thousand separators. For example, *. * puts a ‘.’ before decimals and a space between thousands. In English locales, dflt is “.,” but other locales may alter this default.

      shapes

      A tuple of plotly.graph_objects.layout.Shape instances or dicts with compatible properties

      shapedefaults

      When used in a template (as layout.template.layout.shapedefaults), sets the default property values to use for elements of layout.shapes

      showlegend

      Determines whether or not a legend is drawn. Default is true if there is a trace to show and any of these: a) Two or more traces would by default be shown in the legend. b) One pie trace is shown in the legend. c) One trace is explicitly given with showlegend: true.

      sliders

      A tuple of plotly.graph_objects.layout.Slider instances or dicts with compatible properties

      sliderdefaults

      When used in a template (as layout.template.layout.sliderdefaults), sets the default property values to use for elements of layout.sliders

      spikedistance

      Sets the default distance (in pixels) to look for data to draw spikelines to (-1 means no cutoff, 0 means no looking for data). As with hoverdistance, distance does not apply to area- like objects. In addition, some objects can be hovered on but will not generate spikelines, such as scatter fills.

      sunburstcolorway

      Sets the default sunburst slice colors. Defaults to the main colorway used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see extendsunburstcolors.

      template

      Default attributes to be applied to the plot. This should be a dict with format: {‘layout’: layoutTemplate, ‘data’: {trace_type: [traceTemplate, …], …}} where layoutTemplate is a dict matching the structure of figure.layout and traceTemplate is a dict matching the structure of the trace with type trace_type (e.g. ‘scatter’). Alternatively, this may be specified as an instance of plotly.graph_objs.layout.Template. Trace templates are applied cyclically to traces of each type. Container arrays (eg annotations) have special handling: An object ending in defaults (eg annotationdefaults) is applied to each array item. But if an item has a templateitemname key we look in the template array for an item with matching name and apply that instead. If no matching name is found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so this can be used to add a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matching templateitemname and visible: false.

      ternary

      plotly.graph_objects.layout.Ternary instance or dict with compatible properties

      title

      plotly.graph_objects.layout.Title instance or dict with compatible properties

      titlefont

      Deprecated: Please use layout.title.font instead. Sets the title font. Note that the title’s font used to be customized by the now deprecated titlefont attribute.

      transition

      Sets transition options used during Plotly.react updates.

      treemapcolorway

      Sets the default treemap slice colors. Defaults to the main colorway used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see extendtreemapcolors.

      uirevision

      Used to allow user interactions with the plot to persist after Plotly.react calls that are unaware of these interactions. If uirevision is omitted, or if it is given and it changed from the previous Plotly.react call, the exact new figure is used. If uirevision is truthy and did NOT change, any attribute that has been affected by user interactions and did not receive a different value in the new figure will keep the interaction value. layout.uirevision attribute serves as the default for uirevision attributes in various sub-containers. For finer control you can set these sub-attributes directly. For example, if your app separately controls the data on the x and y axes you might set xaxis.uirevision=*time* and yaxis.uirevision=*cost*. Then if only the y data is changed, you can update yaxis.uirevision=*quantity* and the y axis range will reset but the x axis range will retain any user-driven zoom.

      uniformtext

      :class:`plotly.graph_objects.layout.Uniformtext ` instance or dict with compatible properties

      updatemenus

      A tuple of plotly.graph_objects.layout.Updatemenu instances or dicts with compatible properties

      updatemenudefaults

      When used in a template (as layout.template.layout.updatemenudefaults), sets the default property values to use for elements of layout.updatemenus

      violingap

      Sets the gap (in plot fraction) between violins of adjacent location coordinates. Has no effect on traces that have “width” set.

      violingroupgap

      Sets the gap (in plot fraction) between violins of the same location coordinate. Has no effect on traces that have “width” set.

      violinmode

      Determines how violins at the same location coordinate are displayed on the graph. If “group”, the violins are plotted next to one another centered around the shared location. If “overlay”, the violins are plotted over one another, you might need to set “opacity” to see them multiple violins. Has no effect on traces that have “width” set.

      waterfallgap

      Sets the gap (in plot fraction) between bars of adjacent location coordinates.

      waterfallgroupgap

      Sets the gap (in plot fraction) between bars of the same location coordinate.

      waterfallmode

      Determines how bars at the same location coordinate are displayed on the graph. With “group”, the bars are plotted next to one another centered around the shared location. With “overlay”, the bars are plotted over one another, you might need to an “opacity” to see multiple bars.

      width

      Sets the plot’s width (in px).

      xaxis

      plotly.graph_objects.layout.XAxis instance or dict with compatible properties

      yaxis

      plotly.graph_objects.layout.YAxis instance or dict with compatible properties

  • frames

    The ‘frames’ property is a tuple of instances of Frame that may be specified as:

    • A list or tuple of instances of plotly.graph_objs.Frame

    • A list or tuple of dicts of string/value properties that will be passed to the Frame constructor

      Supported dict properties:

      baseframe

      The name of the frame into which this frame’s properties are merged before applying. This is used to unify properties and avoid needing to specify the same values for the same properties in multiple frames.

      data

      A list of traces this frame modifies. The format is identical to the normal trace definition.

      group

      An identifier that specifies the group to which the frame belongs, used by animate to select a subset of frames.

      layout

      Layout properties which this frame modifies. The format is identical to the normal layout definition.

      name

      A label by which to identify the frame

      traces

      A list of trace indices that identify the respective traces in the data attribute

  • skip_invalid (bool) – If True, invalid properties in the figure specification will be skipped silently. If False (default) invalid properties in the figure specification will result in a ValueError

Raises

ValueError – if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False

Attributes

PlotlyWidget.comm

A trait whose value must be an instance of a specified class.

PlotlyWidget.cross_validation_lock

A contextmanager for running a block with our cross validation lock set to True.

PlotlyWidget.data

The data property is a tuple of the figure’s trace objects

PlotlyWidget.frames

The frames property is a tuple of the figure’s frame objects

PlotlyWidget.keys

An instance of a Python list.

PlotlyWidget.layout

The layout property of the figure

PlotlyWidget.log

A trait whose value must be an instance of a specified class.

PlotlyWidget.model_id

Gets the model id of this widget.

PlotlyWidget.widget_types

PlotlyWidget.widgets

Methods

PlotlyWidget.__getitem__(prop)

PlotlyWidget.add_annotation([arg, align, …])

Create and add a new annotation to the figure’s layout

PlotlyWidget.add_area([customdata, …])

Add a new Area trace

PlotlyWidget.add_bar([alignmentgroup, base, …])

Add a new Bar trace

PlotlyWidget.add_barpolar([base, basesrc, …])

Add a new Barpolar trace

PlotlyWidget.add_box([alignmentgroup, …])

Add a new Box trace

PlotlyWidget.add_candlestick([close, …])

Add a new Candlestick trace

PlotlyWidget.add_carpet([a, a0, aaxis, …])

Add a new Carpet trace

PlotlyWidget.add_choropleth([…])

Add a new Choropleth trace

PlotlyWidget.add_choroplethmapbox([…])

Add a new Choroplethmapbox trace

PlotlyWidget.add_class(className)

Adds a class to the top level element of the widget.

PlotlyWidget.add_cone([anchor, …])

Add a new Cone trace

PlotlyWidget.add_contour([autocolorscale, …])

Add a new Contour trace

PlotlyWidget.add_contourcarpet([a, a0, …])

Add a new Contourcarpet trace

PlotlyWidget.add_densitymapbox([…])

Add a new Densitymapbox trace

PlotlyWidget.add_funnel([alignmentgroup, …])

Add a new Funnel trace

PlotlyWidget.add_funnelarea([aspectratio, …])

Add a new Funnelarea trace

PlotlyWidget.add_heatmap([autocolorscale, …])

Add a new Heatmap trace

PlotlyWidget.add_heatmapgl([autocolorscale, …])

Add a new Heatmapgl trace

PlotlyWidget.add_histogram([alignmentgroup, …])

Add a new Histogram trace

PlotlyWidget.add_histogram2d([autobinx, …])

Add a new Histogram2d trace

PlotlyWidget.add_histogram2dcontour([…])

Add a new Histogram2dContour trace

PlotlyWidget.add_hline(y[, row, col, …])

Add a horizontal line to a plot or subplot that extends infinitely in the x-dimension.

PlotlyWidget.add_hrect(y0, y1[, row, col, …])

Add a rectangle to a plot or subplot that extends infinitely in the x-dimension.

PlotlyWidget.add_image([colormodel, …])

Add a new Image trace

PlotlyWidget.add_indicator([align, …])

Add a new Indicator trace

PlotlyWidget.add_isosurface([…])

Add a new Isosurface trace

PlotlyWidget.add_layout_image([arg, layer, …])

Create and add a new image to the figure’s layout

PlotlyWidget.add_mesh3d([alphahull, …])

Add a new Mesh3d trace

PlotlyWidget.add_ohlc([close, closesrc, …])

Add a new Ohlc trace

PlotlyWidget.add_parcats([arrangement, …])

Add a new Parcats trace

PlotlyWidget.add_parcoords([customdata, …])

Add a new Parcoords trace

PlotlyWidget.add_pie([automargin, …])

Add a new Pie trace

PlotlyWidget.add_pointcloud([customdata, …])

Add a new Pointcloud trace

PlotlyWidget.add_sankey([arrangement, …])

Add a new Sankey trace

PlotlyWidget.add_scatter([cliponaxis, …])

Add a new Scatter trace

PlotlyWidget.add_scatter3d([connectgaps, …])

Add a new Scatter3d trace

PlotlyWidget.add_scattercarpet([a, asrc, b, …])

Add a new Scattercarpet trace

PlotlyWidget.add_scattergeo([connectgaps, …])

Add a new Scattergeo trace

PlotlyWidget.add_scattergl([connectgaps, …])

Add a new Scattergl trace

PlotlyWidget.add_scattermapbox([below, …])

Add a new Scattermapbox trace

PlotlyWidget.add_scatterpolar([cliponaxis, …])

Add a new Scatterpolar trace

PlotlyWidget.add_scatterpolargl([…])

Add a new Scatterpolargl trace

PlotlyWidget.add_scatterternary([a, asrc, …])

Add a new Scatterternary trace

PlotlyWidget.add_shape([arg, editable, …])

Create and add a new shape to the figure’s layout

PlotlyWidget.add_splom([customdata, …])

Add a new Splom trace

PlotlyWidget.add_streamtube([…])

Add a new Streamtube trace

PlotlyWidget.add_sunburst([branchvalues, …])

Add a new Sunburst trace

PlotlyWidget.add_surface([autocolorscale, …])

Add a new Surface trace

PlotlyWidget.add_table([cells, columnorder, …])

Add a new Table trace

PlotlyWidget.add_trace(trace[, row, col, …])

Add a trace to the figure

PlotlyWidget.add_traces(data[, rows, cols, …])

Add traces to the figure

PlotlyWidget.add_traits(**traits)

Dynamically add trait attributes to the Widget.

PlotlyWidget.add_treemap([branchvalues, …])

Add a new Treemap trace

PlotlyWidget.add_violin([alignmentgroup, …])

Add a new Violin trace

PlotlyWidget.add_vline(x[, row, col, …])

Add a vertical line to a plot or subplot that extends infinitely in the y-dimension.

PlotlyWidget.add_volume([autocolorscale, …])

Add a new Volume trace

PlotlyWidget.add_vrect(x0, x1[, row, col, …])

Add a rectangle to a plot or subplot that extends infinitely in the y-dimension.

PlotlyWidget.add_waterfall([alignmentgroup, …])

Add a new Waterfall trace

PlotlyWidget.append_trace(trace, row, col)

Add a trace to the figure bound to axes at the specified row, col index.

PlotlyWidget.batch_animate([duration, easing])

Context manager to animate trace / layout updates

PlotlyWidget.batch_update()

A context manager that batches up trace and layout assignment operations into a singe plotly_update message that is executed when the context exits.

PlotlyWidget.class_own_trait_events(name)

Get a dict of all event handlers defined on this class, not a parent.

PlotlyWidget.class_own_traits(**metadata)

Get a dict of all the traitlets defined on this class, not a parent.

PlotlyWidget.class_trait_names(**metadata)

Get a list of all the names of this class’ traits.

PlotlyWidget.class_traits(**metadata)

Get a dict of all the traits of this class.

PlotlyWidget.close()

Close method.

PlotlyWidget.close_all()

PlotlyWidget.for_each_annotation(fn[, …])

Apply a function to all annotations that satisfy the specified selection criteria

PlotlyWidget.for_each_coloraxis(fn[, …])

Apply a function to all coloraxis objects that satisfy the specified selection criteria

PlotlyWidget.for_each_geo(fn[, selector, …])

Apply a function to all geo objects that satisfy the specified selection criteria

PlotlyWidget.for_each_layout_image(fn[, …])

Apply a function to all images that satisfy the specified selection criteria

PlotlyWidget.for_each_mapbox(fn[, selector, …])

Apply a function to all mapbox objects that satisfy the specified selection criteria

PlotlyWidget.for_each_polar(fn[, selector, …])

Apply a function to all polar objects that satisfy the specified selection criteria

PlotlyWidget.for_each_scene(fn[, selector, …])

Apply a function to all scene objects that satisfy the specified selection criteria

PlotlyWidget.for_each_shape(fn[, selector, …])

Apply a function to all shapes that satisfy the specified selection criteria

PlotlyWidget.for_each_ternary(fn[, …])

Apply a function to all ternary objects that satisfy the specified selection criteria

PlotlyWidget.for_each_trace(fn[, selector, …])

Apply a function to all traces that satisfy the specified selection criteria

PlotlyWidget.for_each_xaxis(fn[, selector, …])

Apply a function to all xaxis objects that satisfy the specified selection criteria

PlotlyWidget.for_each_yaxis(fn[, selector, …])

Apply a function to all yaxis objects that satisfy the specified selection criteria

PlotlyWidget.full_figure_for_development([…])

Compute default values for all attributes not specified in the input figure and returns the output as a “full” figure.

PlotlyWidget.get_manager_state([…])

Returns the full state for a widget manager for embedding

PlotlyWidget.get_state([key, drop_defaults])

Gets the widget state, or a piece of it.

PlotlyWidget.get_subplot(row, col[, secondary_y])

Return an object representing the subplot at the specified row and column.

PlotlyWidget.get_view_spec()

PlotlyWidget.handle_comm_opened(comm, msg)

Static method, called when a widget is constructed.

PlotlyWidget.has_trait(name)

Returns True if the object has a trait with the specified name.

PlotlyWidget.hold_sync()

Hold syncing any state until the outermost context manager exits

PlotlyWidget.hold_trait_notifications()

Context manager for bundling trait change notifications and cross validation.

PlotlyWidget.notify_change(change)

Called when a property has changed.

PlotlyWidget.observe(handler[, names, type])

Setup a handler to be called when a trait changes.

PlotlyWidget.on_displayed(callback[, remove])

(Un)Register a widget displayed callback.

PlotlyWidget.on_edits_completed(fn)

Register a function to be called after all pending trace and layout edit operations have completed

PlotlyWidget.on_msg(callback[, remove])

(Un)Register a custom msg receive callback.

PlotlyWidget.on_trait_change([handler, …])

DEPRECATED: Setup a handler to be called when a trait changes.

PlotlyWidget.on_widget_constructed(callback)

Registers a callback to be called when a widget is constructed.

PlotlyWidget.open()

Open a comm to the frontend if one isn’t already open.

PlotlyWidget.plotly_relayout(relayout_data, …)

Perform a Plotly relayout operation on the figure’s layout

PlotlyWidget.plotly_restyle(restyle_data[, …])

Perform a Plotly restyle operation on the figure’s traces

PlotlyWidget.plotly_update([restyle_data, …])

Perform a Plotly update operation on the figure.

PlotlyWidget.pop(key, *args)

Remove the value associated with the specified key and return it

PlotlyWidget.print_grid()

Print a visual layout of the figure’s axes arrangement.

PlotlyWidget.remove_class(className)

Removes a class from the top level element of the widget.

PlotlyWidget.savefig(filename[, figsize, …])

Safe the figure as a static image.

PlotlyWidget.select_annotations([selector, …])

Select annotations from a particular subplot cell and/or annotations that satisfy custom selection criteria.

PlotlyWidget.select_coloraxes([selector, …])

Select coloraxis subplot objects from a particular subplot cell and/or coloraxis subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_geos([selector, row, col])

Select geo subplot objects from a particular subplot cell and/or geo subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_layout_images([…])

Select images from a particular subplot cell and/or images that satisfy custom selection criteria.

PlotlyWidget.select_mapboxes([selector, …])

Select mapbox subplot objects from a particular subplot cell and/or mapbox subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_polars([selector, row, col])

Select polar subplot objects from a particular subplot cell and/or polar subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_scenes([selector, row, col])

Select scene subplot objects from a particular subplot cell and/or scene subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_shapes([selector, row, …])

Select shapes from a particular subplot cell and/or shapes that satisfy custom selection criteria.

PlotlyWidget.select_ternaries([selector, …])

Select ternary subplot objects from a particular subplot cell and/or ternary subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_traces([selector, row, …])

Select traces from a particular subplot cell and/or traces that satisfy custom selection criteria.

PlotlyWidget.select_xaxes([selector, row, col])

Select xaxis subplot objects from a particular subplot cell and/or xaxis subplot objects that satisfy custom selection criteria.

PlotlyWidget.select_yaxes([selector, row, …])

Select yaxis subplot objects from a particular subplot cell and/or yaxis subplot objects that satisfy custom selection criteria.

PlotlyWidget.send(content[, buffers])

Sends a custom msg to the widget model in the front-end.

PlotlyWidget.send_state([key])

Sends the widget state, or a piece of it, to the front-end, if it exists.

PlotlyWidget.set_state(sync_data)

Called when a state is received from the front-end.

PlotlyWidget.set_subplots([rows, cols])

Add subplots to this figure.

PlotlyWidget.set_trait(name, value)

Forcibly sets trait attribute, including read-only attributes.

PlotlyWidget.setup_instance(**kwargs)

This is called before self.__init__ is called.

PlotlyWidget.show(*args, **kwargs)

Display the figure.

PlotlyWidget.to_dict()

Convert figure to a dictionary

PlotlyWidget.to_html(*args, **kwargs)

Convert a figure to an HTML string representation.

PlotlyWidget.to_image(*args, **kwargs)

Convert a figure to a static image bytes string

PlotlyWidget.to_json(*args, **kwargs)

Convert a figure to a JSON string representation

PlotlyWidget.to_ordered_dict([skip_uid])

PlotlyWidget.to_plotly_json()

Convert figure to a JSON representation as a Python dict

PlotlyWidget.trait_defaults(*names, **metadata)

Return a trait’s default value or a dictionary of them

PlotlyWidget.trait_events([name])

Get a dict of all the event handlers of this class.

PlotlyWidget.trait_has_value(name)

Returns True if the specified trait has a value.

PlotlyWidget.trait_metadata(traitname, key)

Get metadata values for trait by key.

PlotlyWidget.trait_names(**metadata)

Get a list of all the names of this class’ traits.

PlotlyWidget.trait_values(**metadata)

A dict of trait names and their values.

PlotlyWidget.traits(**metadata)

Get a dict of all the traits of this class.

PlotlyWidget.unobserve(handler[, names, type])

Remove a trait change handler.

PlotlyWidget.unobserve_all([name])

Remove trait change handlers of any type for the specified name.

PlotlyWidget.update([dict1, overwrite])

Update the properties of the figure with a dict and/or with keyword arguments.

PlotlyWidget.update_annotations([patch, …])

Perform a property update operation on all annotations that satisfy the specified selection criteria

PlotlyWidget.update_coloraxes([patch, …])

Perform a property update operation on all coloraxis objects that satisfy the specified selection criteria

PlotlyWidget.update_geos([patch, selector, …])

Perform a property update operation on all geo objects that satisfy the specified selection criteria

PlotlyWidget.update_layout([dict1, overwrite])

Update the properties of the figure’s layout with a dict and/or with keyword arguments.

PlotlyWidget.update_layout_images([patch, …])

Perform a property update operation on all images that satisfy the specified selection criteria

PlotlyWidget.update_mapboxes([patch, …])

Perform a property update operation on all mapbox objects that satisfy the specified selection criteria

PlotlyWidget.update_polars([patch, …])

Perform a property update operation on all polar objects that satisfy the specified selection criteria

PlotlyWidget.update_scenes([patch, …])

Perform a property update operation on all scene objects that satisfy the specified selection criteria

PlotlyWidget.update_shapes([patch, …])

Perform a property update operation on all shapes that satisfy the specified selection criteria

PlotlyWidget.update_ternaries([patch, …])

Perform a property update operation on all ternary objects that satisfy the specified selection criteria

PlotlyWidget.update_traces([patch, …])

Perform a property update operation on all traces that satisfy the specified selection criteria

PlotlyWidget.update_xaxes([patch, selector, …])

Perform a property update operation on all xaxis objects that satisfy the specified selection criteria

PlotlyWidget.update_yaxes([patch, selector, …])

Perform a property update operation on all yaxis objects that satisfy the specified selection criteria

PlotlyWidget.write_html(*args, **kwargs)

Write a figure to an HTML file representation

PlotlyWidget.write_image(*args, **kwargs)

Convert a figure to a static image and write it to a file or writeable object

PlotlyWidget.write_json(*args, **kwargs)

Convert a figure to JSON and write it to a file or writeable object

PlotlyWidget.__getitem__(prop)