Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Does the kwarg organization the way ndpositions does
  • Loading branch information
apasarkar committed Apr 16, 2026
commit 525a3a5e361c3c24f160b19da59c7e5fca9251fa
13 changes: 10 additions & 3 deletions fastplotlib/widgets/nd_widget/_nd_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __init__(
spatial_func: Callable[[ArrayProtocol], ArrayProtocol] = None,
slider_dim_transforms=None,
name: str = None,
**kwargs
graphic_kwargs: dict = None,
):
"""
``NDGraphic`` subclass for n-dimensional vector rendering
Expand Down Expand Up @@ -258,8 +258,13 @@ def __init__(

self._graphic: VectorsGraphic | None = None

if graphic_kwargs is None:
self._graphic_kwargs = dict()
else:
self._graphic_kwargs = graphic_kwargs

# create a graphic
self._create_graphic(**kwargs)
self._create_graphic()

@property
def processor(self) -> NDVectorsProcessor:
Expand Down Expand Up @@ -295,7 +300,9 @@ def _create_graphic(self, **kwargs):

# create the new graphic
self._graphic = self._subplot.add_vectors(
Comment thread
kushalkolar marked this conversation as resolved.
Outdated
positions=data_slice[:, 0], directions=data_slice[:, 1], **kwargs
positions=data_slice[:, 0],
directions=data_slice[:, 1],
**self._graphic_kwargs
)

self._subplot.add_graphic(self._graphic)
Expand Down