Skip to content

replace weird quotes, update GraphicMethodsMixin #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion fastplotlib/graphics/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(
if provided, these values are used to map the colors from the cmap

size_space: str, default "screen"
coordinate space in which the size is expressed (screen’, ‘world’, ‘model)
coordinate space in which the size is expressed ("screen", "world", "model")

**kwargs
passed to Graphic
Expand Down
2 changes: 1 addition & 1 deletion fastplotlib/graphics/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(
basically saves GPU VRAM when all scatter points are the same size

size_space: str, default "screen"
coordinate space in which the size is expressed (screen’, ‘world’, ‘model)
coordinate space in which the size is expressed ("screen", "world", "model")

kwargs
passed to Graphic
Expand Down
12 changes: 11 additions & 1 deletion fastplotlib/layouts/_graphic_methods_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def add_image(
----------
data: array-like
array-like, usually numpy.ndarray, must support ``memoryview()``
| shape must be ``[x_dim, y_dim]``
| shape must be ``[n_rows, n_cols]``, ``[n_rows, n_cols, 3]`` for RGB or ``[n_rows, n_cols, 4]`` for RGBA

vmin: int, optional
minimum value for color scaling, calculated from data if not provided
Expand Down Expand Up @@ -185,6 +185,7 @@ def add_line(
cmap: str = None,
cmap_transform: Union[numpy.ndarray, Iterable] = None,
isolated_buffer: bool = True,
size_space: str = "screen",
**kwargs
) -> LineGraphic:
"""
Expand Down Expand Up @@ -217,6 +218,9 @@ def add_line(
cmap_transform: 1D array-like of numerical values, optional
if provided, these values are used to map the colors from the cmap

size_space: str, default "screen"
coordinate space in which the size is expressed ("screen", "world", "model")

**kwargs
passed to Graphic

Expand All @@ -232,6 +236,7 @@ def add_line(
cmap,
cmap_transform,
isolated_buffer,
size_space,
**kwargs
)

Expand Down Expand Up @@ -346,6 +351,7 @@ def add_scatter(
isolated_buffer: bool = True,
sizes: Union[float, numpy.ndarray, Iterable[float]] = 1,
uniform_size: bool = False,
size_space: str = "screen",
**kwargs
) -> ScatterGraphic:
"""
Expand Down Expand Up @@ -386,6 +392,9 @@ def add_scatter(
if True, uses a uniform buffer for the scatter point sizes,
basically saves GPU VRAM when all scatter points are the same size

size_space: str, default "screen"
coordinate space in which the size is expressed ("screen", "world", "model")

kwargs
passed to Graphic

Expand All @@ -402,6 +411,7 @@ def add_scatter(
isolated_buffer,
sizes,
uniform_size,
size_space,
**kwargs
)

Expand Down
Loading