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

Method for_each_yaxis

plotly/graph_objs/_figure.py:23568–23616  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

23566 )
23567
23568 def for_each_yaxis(
23569 self, fn, selector=None, row=None, col=None, secondary_y=None
23570 ) -> "Figure":
23571 """
23572 Apply a function to all yaxis objects that satisfy the
23573 specified selection criteria
23574
23575 Parameters
23576 ----------
23577 fn:
23578 Function that inputs a single yaxis object.
23579 selector: dict, function, or None (default None)
23580 Dict to use as selection criteria.
23581 yaxis objects will be selected if they contain
23582 properties corresponding to all of the dictionary's keys, with
23583 values that exactly match the supplied values. If None
23584 (the default), all yaxis objects are selected. If a
23585 function, it must be a function accepting a single argument and
23586 returning a boolean. The function will be called on each
23587 yaxis and those for which the function returned True will
23588 be in the selection.
23589 row, col: int or None (default None)
23590 Subplot row and column index of yaxis objects to select.
23591 To select yaxis objects by row and column, the Figure
23592 must have been created using plotly.subplots.make_subplots.
23593 If None (the default), all yaxis objects are selected.
23594 secondary_y: boolean or None (default None)
23595 * If True, only select yaxis objects associated with the secondary
23596 y-axis of the subplot.
23597 * If False, only select yaxis objects associated with the primary
23598 y-axis of the subplot.
23599 * If None (the default), do not filter yaxis objects based on
23600 a secondary y-axis condition.
23601
23602 To select yaxis objects by secondary y-axis, the Figure must
23603 have been created using plotly.subplots.make_subplots. See
23604 the docstring for the specs argument to make_subplots for more
23605 info on creating subplots with secondary y-axes.
23606 Returns
23607 -------
23608 self
23609 Returns the Figure object that the method was called on
23610 """
23611 for obj in self.select_yaxes(
23612 selector=selector, row=row, col=col, secondary_y=secondary_y
23613 ):
23614 fn(obj)
23615
23616 return self
23617
23618 def update_yaxes(
23619 self,

Callers

nothing calls this directly

Calls 2

select_yaxesMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected