@@ -256,12 +256,16 @@ def select_{plural_name}(
256
256
257
257
Parameters
258
258
----------
259
- selector: dict or None (default None)
259
+ selector: dict, function, or None (default None)
260
260
Dict to use as selection criteria.
261
261
{ singular_name } objects will be selected if they contain
262
262
properties corresponding to all of the dictionary's keys, with
263
263
values that exactly match the supplied values. If None
264
- (the default), all { singular_name } objects are selected.
264
+ (the default), all { singular_name } objects are selected. If a
265
+ function, it must be a function accepting a single argument and
266
+ returning a boolean. The function will be called on each
267
+ { singular_name } and those for which the function returned True will
268
+ be in the selection.
265
269
row, col: int or None (default None)
266
270
Subplot row and column index of { singular_name } objects to select.
267
271
To select { singular_name } objects by row and column, the Figure
@@ -288,12 +292,16 @@ def for_each_{singular_name}(
288
292
----------
289
293
fn:
290
294
Function that inputs a single { singular_name } object.
291
- selector: dict or None (default None)
295
+ selector: dict, function, or None (default None)
292
296
Dict to use as selection criteria.
293
297
{ singular_name } objects will be selected if they contain
294
298
properties corresponding to all of the dictionary's keys, with
295
299
values that exactly match the supplied values. If None
296
- (the default), all { singular_name } objects are selected.
300
+ (the default), all { singular_name } objects are selected. If a
301
+ function, it must be a function accepting a single argument and
302
+ returning a boolean. The function will be called on each
303
+ { singular_name } and those for which the function returned True will
304
+ be in the selection.
297
305
row, col: int or None (default None)
298
306
Subplot row and column index of { singular_name } objects to select.
299
307
To select { singular_name } objects by row and column, the Figure
@@ -327,12 +335,16 @@ def update_{plural_name}(
327
335
patch: dict
328
336
Dictionary of property updates to be applied to all
329
337
{ singular_name } objects that satisfy the selection criteria.
330
- selector: dict or None (default None)
338
+ selector: dict, function, or None (default None)
331
339
Dict to use as selection criteria.
332
340
{ singular_name } objects will be selected if they contain
333
341
properties corresponding to all of the dictionary's keys, with
334
342
values that exactly match the supplied values. If None
335
- (the default), all { singular_name } objects are selected.
343
+ (the default), all { singular_name } objects are selected. If a
344
+ function, it must be a function accepting a single argument and
345
+ returning a boolean. The function will be called on each
346
+ { singular_name } and those for which the function returned True will
347
+ be in the selection.
336
348
overwrite: bool
337
349
If True, overwrite existing properties. If False, apply updates
338
350
to existing properties recursively, preserving existing
@@ -383,12 +395,15 @@ def select_{method_prefix}{plural_name}(
383
395
384
396
Parameters
385
397
----------
386
- selector: dict or None (default None)
398
+ selector: dict, function, or None (default None)
387
399
Dict to use as selection criteria.
388
400
Annotations will be selected if they contain properties corresponding
389
401
to all of the dictionary's keys, with values that exactly match
390
402
the supplied values. If None (the default), all { plural_name } are
391
- selected.
403
+ selected. If a function, it must be a function accepting a single
404
+ argument and returning a boolean. The function will be called on
405
+ each { singular_name } and those for which the function returned True
406
+ will be in the selection.
392
407
row, col: int or None (default None)
393
408
Subplot row and column index of { plural_name } to select.
394
409
To select { plural_name } by row and column, the Figure must have been
@@ -428,12 +443,15 @@ def for_each_{method_prefix}{singular_name}(
428
443
----------
429
444
fn:
430
445
Function that inputs a single { singular_name } object.
431
- selector: dict or None (default None)
446
+ selector: dict, function, or None (default None)
432
447
Dict to use as selection criteria.
433
448
Traces will be selected if they contain properties corresponding
434
449
to all of the dictionary's keys, with values that exactly match
435
450
the supplied values. If None (the default), all { plural_name } are
436
- selected.
451
+ selected. If a function, it must be a function accepting a single
452
+ argument and returning a boolean. The function will be called on
453
+ each { singular_name } and those for which the function returned True
454
+ will be in the selection.
437
455
row, col: int or None (default None)
438
456
Subplot row and column index of { plural_name } to select.
439
457
To select { plural_name } by row and column, the Figure must have been
@@ -486,12 +504,15 @@ def update_{method_prefix}{plural_name}(
486
504
patch: dict or None (default None)
487
505
Dictionary of property updates to be applied to all { plural_name } that
488
506
satisfy the selection criteria.
489
- selector: dict or None (default None)
507
+ selector: dict, function, or None (default None)
490
508
Dict to use as selection criteria.
491
509
Traces will be selected if they contain properties corresponding
492
510
to all of the dictionary's keys, with values that exactly match
493
511
the supplied values. If None (the default), all { plural_name } are
494
- selected.
512
+ selected. If a function, it must be a function accepting a single
513
+ argument and returning a boolean. The function will be called on
514
+ each { singular_name } and those for which the function returned True
515
+ will be in the selection.
495
516
row, col: int or None (default None)
496
517
Subplot row and column index of { plural_name } to select.
497
518
To select { plural_name } by row and column, the Figure must have been
0 commit comments