Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 67dfd00

Browse filesBrowse files
committed
add plot area hook for collections
1 parent c8bf515 commit 67dfd00
Copy full SHA for 67dfd00

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎fastplotlib/graphics/_collection_base.py

Copy file name to clipboardExpand all lines: fastplotlib/graphics/_collection_base.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ def remove_event_handler(self, callback, *types):
299299
"""remove an event handler"""
300300
self[:].remove_event_handler(callback, *types)
301301

302+
def _fpl_add_plot_area_hook(self, plot_area):
303+
super()._fpl_add_plot_area_hook(plot_area)
304+
305+
for g in self:
306+
g._fpl_add_plot_area_hook(plot_area)
307+
302308
def __getitem__(self, key) -> CollectionIndexer:
303309
if np.issubdtype(type(key), np.integer):
304310
addr = self._graphics[key]
@@ -351,7 +357,7 @@ def __init__(self, selection: np.ndarray[Graphic], feature: str):
351357
self._feature_instances = [getattr(g, feature) for g in self._selection]
352358

353359
def __getitem__(self, item):
354-
return [fi[item] for fi in self._feature_instances]
360+
return np.stack([fi[item] for fi in self._feature_instances])
355361

356362
def __setitem__(self, key, value):
357363
for fi in self._feature_instances:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.