Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a141f51

Browse files
authored
replace weird quotes, update GraphicMethodsMixin (#735)
1 parent c734f02 commit a141f51

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

fastplotlib/graphics/line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
if provided, these values are used to map the colors from the cmap
5656
5757
size_space: str, default "screen"
58-
coordinate space in which the size is expressed (screen’, ‘world’, ‘model)
58+
coordinate space in which the size is expressed ("screen", "world", "model")
5959
6060
**kwargs
6161
passed to Graphic

fastplotlib/graphics/scatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
basically saves GPU VRAM when all scatter points are the same size
6363
6464
size_space: str, default "screen"
65-
coordinate space in which the size is expressed (screen’, ‘world’, ‘model)
65+
coordinate space in which the size is expressed ("screen", "world", "model")
6666
6767
kwargs
6868
passed to Graphic

fastplotlib/layouts/_graphic_methods_mixin.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def add_image(
4545
----------
4646
data: array-like
4747
array-like, usually numpy.ndarray, must support ``memoryview()``
48-
| shape must be ``[x_dim, y_dim]``
48+
| shape must be ``[n_rows, n_cols]``, ``[n_rows, n_cols, 3]`` for RGB or ``[n_rows, n_cols, 4]`` for RGBA
4949
5050
vmin: int, optional
5151
minimum value for color scaling, calculated from data if not provided
@@ -185,6 +185,7 @@ def add_line(
185185
cmap: str = None,
186186
cmap_transform: Union[numpy.ndarray, Iterable] = None,
187187
isolated_buffer: bool = True,
188+
size_space: str = "screen",
188189
**kwargs
189190
) -> LineGraphic:
190191
"""
@@ -217,6 +218,9 @@ def add_line(
217218
cmap_transform: 1D array-like of numerical values, optional
218219
if provided, these values are used to map the colors from the cmap
219220
221+
size_space: str, default "screen"
222+
coordinate space in which the size is expressed ("screen", "world", "model")
223+
220224
**kwargs
221225
passed to Graphic
222226
@@ -232,6 +236,7 @@ def add_line(
232236
cmap,
233237
cmap_transform,
234238
isolated_buffer,
239+
size_space,
235240
**kwargs
236241
)
237242

@@ -346,6 +351,7 @@ def add_scatter(
346351
isolated_buffer: bool = True,
347352
sizes: Union[float, numpy.ndarray, Iterable[float]] = 1,
348353
uniform_size: bool = False,
354+
size_space: str = "screen",
349355
**kwargs
350356
) -> ScatterGraphic:
351357
"""
@@ -386,6 +392,9 @@ def add_scatter(
386392
if True, uses a uniform buffer for the scatter point sizes,
387393
basically saves GPU VRAM when all scatter points are the same size
388394
395+
size_space: str, default "screen"
396+
coordinate space in which the size is expressed ("screen", "world", "model")
397+
389398
kwargs
390399
passed to Graphic
391400
@@ -402,6 +411,7 @@ def add_scatter(
402411
isolated_buffer,
403412
sizes,
404413
uniform_size,
414+
size_space,
405415
**kwargs
406416
)
407417

0 commit comments

Comments
 (0)