Apply a function to all smith objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single smith object. selector: dict, function, or None (default None) Dict to use as selectio
(self, fn, selector=None, row=None, col=None)
| 23220 | return self._select_layout_subplots_by_prefix("smith", selector, row, col) |
| 23221 | |
| 23222 | def for_each_smith(self, fn, selector=None, row=None, col=None) -> "FigureWidget": |
| 23223 | """ |
| 23224 | Apply a function to all smith objects that satisfy the |
| 23225 | specified selection criteria |
| 23226 | |
| 23227 | Parameters |
| 23228 | ---------- |
| 23229 | fn: |
| 23230 | Function that inputs a single smith object. |
| 23231 | selector: dict, function, or None (default None) |
| 23232 | Dict to use as selection criteria. |
| 23233 | smith objects will be selected if they contain |
| 23234 | properties corresponding to all of the dictionary's keys, with |
| 23235 | values that exactly match the supplied values. If None |
| 23236 | (the default), all smith objects are selected. If a |
| 23237 | function, it must be a function accepting a single argument and |
| 23238 | returning a boolean. The function will be called on each |
| 23239 | smith and those for which the function returned True will |
| 23240 | be in the selection. |
| 23241 | row, col: int or None (default None) |
| 23242 | Subplot row and column index of smith objects to select. |
| 23243 | To select smith objects by row and column, the Figure |
| 23244 | must have been created using plotly.subplots.make_subplots. |
| 23245 | If None (the default), all smith objects are selected. |
| 23246 | Returns |
| 23247 | ------- |
| 23248 | self |
| 23249 | Returns the FigureWidget object that the method was called on |
| 23250 | """ |
| 23251 | for obj in self.select_smiths(selector=selector, row=row, col=col): |
| 23252 | fn(obj) |
| 23253 | |
| 23254 | return self |
| 23255 | |
| 23256 | def update_smiths( |
| 23257 | self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs |
nothing calls this directly
no test coverage detected