Perform a property update operation on all annotations that satisfy the specified selection criteria Parameters ---------- patch: dict or None (default None) Dictionary of property updates to be applied to all annotations that satisfy
(
self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs
)
| 23789 | return self |
| 23790 | |
| 23791 | def update_annotations( |
| 23792 | self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs |
| 23793 | ) -> "FigureWidget": |
| 23794 | """ |
| 23795 | Perform a property update operation on all annotations that satisfy the |
| 23796 | specified selection criteria |
| 23797 | |
| 23798 | Parameters |
| 23799 | ---------- |
| 23800 | patch: dict or None (default None) |
| 23801 | Dictionary of property updates to be applied to all annotations that |
| 23802 | satisfy the selection criteria. |
| 23803 | selector: dict, function, int, str or None (default None) |
| 23804 | Dict to use as selection criteria. |
| 23805 | Traces will be selected if they contain properties corresponding |
| 23806 | to all of the dictionary's keys, with values that exactly match |
| 23807 | the supplied values. If None (the default), all annotations are |
| 23808 | selected. If a function, it must be a function accepting a single |
| 23809 | argument and returning a boolean. The function will be called on |
| 23810 | each annotation and those for which the function returned True |
| 23811 | will be in the selection. If an int N, the Nth annotation matching row |
| 23812 | and col will be selected (N can be negative). If a string S, the selector |
| 23813 | is equivalent to dict(type=S). |
| 23814 | row, col: int or None (default None) |
| 23815 | Subplot row and column index of annotations to select. |
| 23816 | To select annotations by row and column, the Figure must have been |
| 23817 | created using plotly.subplots.make_subplots. To select only those |
| 23818 | annotation that are in paper coordinates, set row and col to the |
| 23819 | string 'paper'. If None (the default), all annotations are selected. |
| 23820 | secondary_y: boolean or None (default None) |
| 23821 | * If True, only select annotations associated with the secondary |
| 23822 | y-axis of the subplot. |
| 23823 | * If False, only select annotations associated with the primary |
| 23824 | y-axis of the subplot. |
| 23825 | * If None (the default), do not filter annotations based on secondary |
| 23826 | y-axis. |
| 23827 | |
| 23828 | To select annotations by secondary y-axis, the Figure must have been |
| 23829 | created using plotly.subplots.make_subplots. See the docstring |
| 23830 | for the specs argument to make_subplots for more info on |
| 23831 | creating subplots with secondary y-axes. |
| 23832 | **kwargs |
| 23833 | Additional property updates to apply to each selected annotation. If |
| 23834 | a property is specified in both patch and in **kwargs then the |
| 23835 | one in **kwargs takes precedence. |
| 23836 | |
| 23837 | Returns |
| 23838 | ------- |
| 23839 | self |
| 23840 | Returns the FigureWidget object that the method was called on |
| 23841 | """ |
| 23842 | for obj in self._select_annotations_like( |
| 23843 | prop="annotations", |
| 23844 | selector=selector, |
| 23845 | row=row, |
| 23846 | col=col, |
| 23847 | secondary_y=secondary_y, |
| 23848 | ): |
nothing calls this directly
no test coverage detected