MCPcopy Index your code
hub / github.com/plotly/plotly.py / for_each_scene

Method for_each_scene

plotly/graph_objs/_figurewidget.py:23110–23142  ·  view source on GitHub ↗

Apply a function to all scene objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single scene object. selector: dict, function, or None (default None) Dict to use as selectio

(self, fn, selector=None, row=None, col=None)

Source from the content-addressed store, hash-verified

23108 return self._select_layout_subplots_by_prefix("scene", selector, row, col)
23109
23110 def for_each_scene(self, fn, selector=None, row=None, col=None) -> "FigureWidget":
23111 """
23112 Apply a function to all scene objects that satisfy the
23113 specified selection criteria
23114
23115 Parameters
23116 ----------
23117 fn:
23118 Function that inputs a single scene object.
23119 selector: dict, function, or None (default None)
23120 Dict to use as selection criteria.
23121 scene objects will be selected if they contain
23122 properties corresponding to all of the dictionary's keys, with
23123 values that exactly match the supplied values. If None
23124 (the default), all scene objects are selected. If a
23125 function, it must be a function accepting a single argument and
23126 returning a boolean. The function will be called on each
23127 scene and those for which the function returned True will
23128 be in the selection.
23129 row, col: int or None (default None)
23130 Subplot row and column index of scene objects to select.
23131 To select scene objects by row and column, the Figure
23132 must have been created using plotly.subplots.make_subplots.
23133 If None (the default), all scene objects are selected.
23134 Returns
23135 -------
23136 self
23137 Returns the FigureWidget object that the method was called on
23138 """
23139 for obj in self.select_scenes(selector=selector, row=row, col=col):
23140 fn(obj)
23141
23142 return self
23143
23144 def update_scenes(
23145 self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs

Callers

nothing calls this directly

Calls 2

select_scenesMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected