Perform a property update operation on all traces that satisfy the specified selection criteria Parameters ---------- patch: dict or None (default None) Dictionary of property updates to be applied to all traces that satisfy the selec
(
self,
patch=None,
selector=None,
row=None,
col=None,
secondary_y=None,
overwrite=False,
**kwargs,
)
| 1322 | return self |
| 1323 | |
| 1324 | def update_traces( |
| 1325 | self, |
| 1326 | patch=None, |
| 1327 | selector=None, |
| 1328 | row=None, |
| 1329 | col=None, |
| 1330 | secondary_y=None, |
| 1331 | overwrite=False, |
| 1332 | **kwargs, |
| 1333 | ): |
| 1334 | """ |
| 1335 | Perform a property update operation on all traces that satisfy the |
| 1336 | specified selection criteria |
| 1337 | |
| 1338 | Parameters |
| 1339 | ---------- |
| 1340 | patch: dict or None (default None) |
| 1341 | Dictionary of property updates to be applied to all traces that |
| 1342 | satisfy the selection criteria. |
| 1343 | selector: dict, function, int, str or None (default None) |
| 1344 | Dict to use as selection criteria. |
| 1345 | Traces will be selected if they contain properties corresponding |
| 1346 | to all of the dictionary's keys, with values that exactly match |
| 1347 | the supplied values. If None (the default), all traces are |
| 1348 | selected. If a function, it must be a function accepting a single |
| 1349 | argument and returning a boolean. The function will be called on |
| 1350 | each trace and those for which the function returned True |
| 1351 | will be in the selection. If an int N, the Nth trace matching row |
| 1352 | and col will be selected (N can be negative). If a string S, the selector |
| 1353 | is equivalent to dict(type=S). |
| 1354 | row, col: int or None (default None) |
| 1355 | Subplot row and column index of traces to select. |
| 1356 | To select traces by row and column, the Figure must have been |
| 1357 | created using plotly.subplots.make_subplots. If None |
| 1358 | (the default), all traces are selected. |
| 1359 | secondary_y: boolean or None (default None) |
| 1360 | * If True, only select traces associated with the secondary |
| 1361 | y-axis of the subplot. |
| 1362 | * If False, only select traces associated with the primary |
| 1363 | y-axis of the subplot. |
| 1364 | * If None (the default), do not filter traces based on secondary |
| 1365 | y-axis. |
| 1366 | |
| 1367 | To select traces by secondary y-axis, the Figure must have been |
| 1368 | created using plotly.subplots.make_subplots. See the docstring |
| 1369 | for the specs argument to make_subplots for more info on |
| 1370 | creating subplots with secondary y-axes. |
| 1371 | overwrite: bool |
| 1372 | If True, overwrite existing properties. If False, apply updates |
| 1373 | to existing properties recursively, preserving existing |
| 1374 | properties that are not specified in the update operation. |
| 1375 | **kwargs |
| 1376 | Additional property updates to apply to each selected trace. If |
| 1377 | a property is specified in both patch and in **kwargs then the |
| 1378 | one in **kwargs takes precedence. |
| 1379 | |
| 1380 | Returns |
| 1381 | ------- |