@@ -256,12 +256,16 @@ def select_{plural_name}(
256256
257257 Parameters
258258 ----------
259- selector: dict or None (default None)
259+ selector: dict, function, or None (default None)
260260 Dict to use as selection criteria.
261261 { singular_name } objects will be selected if they contain
262262 properties corresponding to all of the dictionary's keys, with
263263 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.
265269 row, col: int or None (default None)
266270 Subplot row and column index of { singular_name } objects to select.
267271 To select { singular_name } objects by row and column, the Figure
@@ -288,12 +292,16 @@ def for_each_{singular_name}(
288292 ----------
289293 fn:
290294 Function that inputs a single { singular_name } object.
291- selector: dict or None (default None)
295+ selector: dict, function, or None (default None)
292296 Dict to use as selection criteria.
293297 { singular_name } objects will be selected if they contain
294298 properties corresponding to all of the dictionary's keys, with
295299 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.
297305 row, col: int or None (default None)
298306 Subplot row and column index of { singular_name } objects to select.
299307 To select { singular_name } objects by row and column, the Figure
@@ -327,12 +335,16 @@ def update_{plural_name}(
327335 patch: dict
328336 Dictionary of property updates to be applied to all
329337 { singular_name } objects that satisfy the selection criteria.
330- selector: dict or None (default None)
338+ selector: dict, function, or None (default None)
331339 Dict to use as selection criteria.
332340 { singular_name } objects will be selected if they contain
333341 properties corresponding to all of the dictionary's keys, with
334342 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.
336348 overwrite: bool
337349 If True, overwrite existing properties. If False, apply updates
338350 to existing properties recursively, preserving existing
@@ -383,12 +395,15 @@ def select_{method_prefix}{plural_name}(
383395
384396 Parameters
385397 ----------
386- selector: dict or None (default None)
398+ selector: dict, function, or None (default None)
387399 Dict to use as selection criteria.
388400 Annotations will be selected if they contain properties corresponding
389401 to all of the dictionary's keys, with values that exactly match
390402 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.
392407 row, col: int or None (default None)
393408 Subplot row and column index of { plural_name } to select.
394409 To select { plural_name } by row and column, the Figure must have been
@@ -428,12 +443,15 @@ def for_each_{method_prefix}{singular_name}(
428443 ----------
429444 fn:
430445 Function that inputs a single { singular_name } object.
431- selector: dict or None (default None)
446+ selector: dict, function, or None (default None)
432447 Dict to use as selection criteria.
433448 Traces will be selected if they contain properties corresponding
434449 to all of the dictionary's keys, with values that exactly match
435450 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.
437455 row, col: int or None (default None)
438456 Subplot row and column index of { plural_name } to select.
439457 To select { plural_name } by row and column, the Figure must have been
@@ -486,12 +504,15 @@ def update_{method_prefix}{plural_name}(
486504 patch: dict or None (default None)
487505 Dictionary of property updates to be applied to all { plural_name } that
488506 satisfy the selection criteria.
489- selector: dict or None (default None)
507+ selector: dict, function, or None (default None)
490508 Dict to use as selection criteria.
491509 Traces will be selected if they contain properties corresponding
492510 to all of the dictionary's keys, with values that exactly match
493511 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.
495516 row, col: int or None (default None)
496517 Subplot row and column index of { plural_name } to select.
497518 To select { plural_name } by row and column, the Figure must have been
0 commit comments