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

Method for_each_geo

plotly/graph_objs/_figure.py:22546–22578  ·  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

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