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

Method for_each_xaxis

plotly/graph_objs/_figurewidget.py:23446–23478  ·  view source on GitHub ↗

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

23444 return self._select_layout_subplots_by_prefix("xaxis", selector, row, col)
23445
23446 def for_each_xaxis(self, fn, selector=None, row=None, col=None) -> "FigureWidget":
23447 """
23448 Apply a function to all xaxis objects that satisfy the
23449 specified selection criteria
23450
23451 Parameters
23452 ----------
23453 fn:
23454 Function that inputs a single xaxis object.
23455 selector: dict, function, or None (default None)
23456 Dict to use as selection criteria.
23457 xaxis objects will be selected if they contain
23458 properties corresponding to all of the dictionary's keys, with
23459 values that exactly match the supplied values. If None
23460 (the default), all xaxis objects are selected. If a
23461 function, it must be a function accepting a single argument and
23462 returning a boolean. The function will be called on each
23463 xaxis and those for which the function returned True will
23464 be in the selection.
23465 row, col: int or None (default None)
23466 Subplot row and column index of xaxis objects to select.
23467 To select xaxis objects by row and column, the Figure
23468 must have been created using plotly.subplots.make_subplots.
23469 If None (the default), all xaxis objects are selected.
23470 Returns
23471 -------
23472 self
23473 Returns the FigureWidget object that the method was called on
23474 """
23475 for obj in self.select_xaxes(selector=selector, row=row, col=col):
23476 fn(obj)
23477
23478 return self
23479
23480 def update_xaxes(
23481 self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs

Callers

nothing calls this directly

Calls 2

select_xaxesMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected