Apply a function to all map objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single map object. selector: dict, function, or None (default None) Dict to use as selection cr
(self, fn, selector=None, row=None, col=None)
| 22768 | return self._select_layout_subplots_by_prefix("map", selector, row, col) |
| 22769 | |
| 22770 | def for_each_map(self, fn, selector=None, row=None, col=None) -> "Figure": |
| 22771 | """ |
| 22772 | Apply a function to all map objects that satisfy the |
| 22773 | specified selection criteria |
| 22774 | |
| 22775 | Parameters |
| 22776 | ---------- |
| 22777 | fn: |
| 22778 | Function that inputs a single map object. |
| 22779 | selector: dict, function, or None (default None) |
| 22780 | Dict to use as selection criteria. |
| 22781 | map objects will be selected if they contain |
| 22782 | properties corresponding to all of the dictionary's keys, with |
| 22783 | values that exactly match the supplied values. If None |
| 22784 | (the default), all map objects are selected. If a |
| 22785 | function, it must be a function accepting a single argument and |
| 22786 | returning a boolean. The function will be called on each |
| 22787 | map and those for which the function returned True will |
| 22788 | be in the selection. |
| 22789 | row, col: int or None (default None) |
| 22790 | Subplot row and column index of map objects to select. |
| 22791 | To select map objects by row and column, the Figure |
| 22792 | must have been created using plotly.subplots.make_subplots. |
| 22793 | If None (the default), all map objects are selected. |
| 22794 | Returns |
| 22795 | ------- |
| 22796 | self |
| 22797 | Returns the Figure object that the method was called on |
| 22798 | """ |
| 22799 | for obj in self.select_maps(selector=selector, row=row, col=col): |
| 22800 | fn(obj) |
| 22801 | |
| 22802 | return self |
| 22803 | |
| 22804 | def update_maps( |
| 22805 | self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs |
nothing calls this directly
no test coverage detected