Apply a function to all mapbox objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single mapbox object. selector: dict, function, or None (default None) Dict to use as select
(self, fn, selector=None, row=None, col=None)
| 22884 | return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) |
| 22885 | |
| 22886 | def for_each_mapbox(self, fn, selector=None, row=None, col=None) -> "FigureWidget": |
| 22887 | """ |
| 22888 | Apply a function to all mapbox objects that satisfy the |
| 22889 | specified selection criteria |
| 22890 | |
| 22891 | Parameters |
| 22892 | ---------- |
| 22893 | fn: |
| 22894 | Function that inputs a single mapbox object. |
| 22895 | selector: dict, function, or None (default None) |
| 22896 | Dict to use as selection criteria. |
| 22897 | mapbox objects will be selected if they contain |
| 22898 | properties corresponding to all of the dictionary's keys, with |
| 22899 | values that exactly match the supplied values. If None |
| 22900 | (the default), all mapbox objects are selected. If a |
| 22901 | function, it must be a function accepting a single argument and |
| 22902 | returning a boolean. The function will be called on each |
| 22903 | mapbox and those for which the function returned True will |
| 22904 | be in the selection. |
| 22905 | row, col: int or None (default None) |
| 22906 | Subplot row and column index of mapbox objects to select. |
| 22907 | To select mapbox objects by row and column, the Figure |
| 22908 | must have been created using plotly.subplots.make_subplots. |
| 22909 | If None (the default), all mapbox objects are selected. |
| 22910 | Returns |
| 22911 | ------- |
| 22912 | self |
| 22913 | Returns the FigureWidget object that the method was called on |
| 22914 | """ |
| 22915 | for obj in self.select_mapboxes(selector=selector, row=row, col=col): |
| 22916 | fn(obj) |
| 22917 | |
| 22918 | return self |
| 22919 | |
| 22920 | def update_mapboxes( |
| 22921 | self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs |
nothing calls this directly
no test coverage detected