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

Method select_legends

plotly/graph_objs/_figure.py:22626–22656  ·  view source on GitHub ↗

Select legend subplot objects from a particular subplot cell and/or legend subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict, function, or None (default None) Dict to use as selection criteria.

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

Source from the content-addressed store, hash-verified

22624 return self
22625
22626 def select_legends(self, selector=None, row=None, col=None):
22627 """
22628 Select legend subplot objects from a particular subplot cell
22629 and/or legend subplot objects that satisfy custom selection
22630 criteria.
22631
22632 Parameters
22633 ----------
22634 selector: dict, function, or None (default None)
22635 Dict to use as selection criteria.
22636 legend objects will be selected if they contain
22637 properties corresponding to all of the dictionary's keys, with
22638 values that exactly match the supplied values. If None
22639 (the default), all legend objects are selected. If a
22640 function, it must be a function accepting a single argument and
22641 returning a boolean. The function will be called on each
22642 legend and those for which the function returned True will
22643 be in the selection.
22644 row, col: int or None (default None)
22645 Subplot row and column index of legend objects to select.
22646 To select legend objects by row and column, the Figure
22647 must have been created using plotly.subplots.make_subplots.
22648 If None (the default), all legend objects are selected.
22649 Returns
22650 -------
22651 generator
22652 Generator that iterates through all of the legend
22653 objects that satisfy all of the specified selection criteria
22654 """
22655
22656 return self._select_layout_subplots_by_prefix("legend", selector, row, col)
22657
22658 def for_each_legend(self, fn, selector=None, row=None, col=None) -> "Figure":
22659 """

Callers 2

for_each_legendMethod · 0.95
update_legendsMethod · 0.95

Tested by

no test coverage detected