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

Method for_each_geo

plotly/graph_objs/_figurewidget.py:22550–22582  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

22548 return self._select_layout_subplots_by_prefix("geo", selector, row, col)
22549
22550 def for_each_geo(self, fn, selector=None, row=None, col=None) -> "FigureWidget":
22551 """
22552 Apply a function to all geo objects that satisfy the
22553 specified selection criteria
22554
22555 Parameters
22556 ----------
22557 fn:
22558 Function that inputs a single geo object.
22559 selector: dict, function, or None (default None)
22560 Dict to use as selection criteria.
22561 geo objects will be selected if they contain
22562 properties corresponding to all of the dictionary's keys, with
22563 values that exactly match the supplied values. If None
22564 (the default), all geo objects are selected. If a
22565 function, it must be a function accepting a single argument and
22566 returning a boolean. The function will be called on each
22567 geo and those for which the function returned True will
22568 be in the selection.
22569 row, col: int or None (default None)
22570 Subplot row and column index of geo objects to select.
22571 To select geo objects by row and column, the Figure
22572 must have been created using plotly.subplots.make_subplots.
22573 If None (the default), all geo objects are selected.
22574 Returns
22575 -------
22576 self
22577 Returns the FigureWidget object that the method was called on
22578 """
22579 for obj in self.select_geos(selector=selector, row=row, col=col):
22580 fn(obj)
22581
22582 return self
22583
22584 def update_geos(
22585 self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs

Callers

nothing calls this directly

Calls 2

select_geosMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected