MCPcopy Create free account
hub / github.com/plotly/plotly.py / for_each_polar

Method for_each_polar

plotly/graph_objs/_figurewidget.py:22998–23030  ·  view source on GitHub ↗

Apply a function to all polar objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single polar 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

22996 return self._select_layout_subplots_by_prefix("polar", selector, row, col)
22997
22998 def for_each_polar(self, fn, selector=None, row=None, col=None) -> "FigureWidget":
22999 """
23000 Apply a function to all polar objects that satisfy the
23001 specified selection criteria
23002
23003 Parameters
23004 ----------
23005 fn:
23006 Function that inputs a single polar object.
23007 selector: dict, function, or None (default None)
23008 Dict to use as selection criteria.
23009 polar objects will be selected if they contain
23010 properties corresponding to all of the dictionary's keys, with
23011 values that exactly match the supplied values. If None
23012 (the default), all polar objects are selected. If a
23013 function, it must be a function accepting a single argument and
23014 returning a boolean. The function will be called on each
23015 polar and those for which the function returned True will
23016 be in the selection.
23017 row, col: int or None (default None)
23018 Subplot row and column index of polar objects to select.
23019 To select polar objects by row and column, the Figure
23020 must have been created using plotly.subplots.make_subplots.
23021 If None (the default), all polar objects are selected.
23022 Returns
23023 -------
23024 self
23025 Returns the FigureWidget object that the method was called on
23026 """
23027 for obj in self.select_polars(selector=selector, row=row, col=col):
23028 fn(obj)
23029
23030 return self
23031
23032 def update_polars(
23033 self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs

Callers

nothing calls this directly

Calls 2

select_polarsMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected