Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
84e6590
remove isolated_buffer
kushalkolar Jan 13, 2026
7163c96
remove isolated_buffer from mixin
kushalkolar Jan 13, 2026
426ee5c
basics works for positions data
kushalkolar Jan 13, 2026
23622b0
replaceable buffers for all positions related features
kushalkolar Jan 13, 2026
e19588a
image data buffer can change
kushalkolar Jan 13, 2026
d9f5ca9
resizeable buffers for volume
kushalkolar Jan 13, 2026
ea0d791
black
kushalkolar Jan 13, 2026
734be0e
buffer resize condition checked only if new value is an array
kushalkolar Jan 13, 2026
7974436
gc for buffer managers
kushalkolar Jan 13, 2026
fe749ce
uniform colors WIP
kushalkolar Jan 14, 2026
e667a9d
Merge branch 'main' into replaceable-buffers
kushalkolar Feb 2, 2026
b8f8613
switching color modes works!
kushalkolar Feb 2, 2026
543d4e9
typo
kushalkolar Feb 2, 2026
8a1c15a
balck
kushalkolar Feb 2, 2026
fdeecb1
update tests for color_mode
kushalkolar Feb 2, 2026
6299cdd
update examples
kushalkolar Feb 2, 2026
8b217cc
backend tests passing
kushalkolar Feb 2, 2026
5fd68e2
default for all uniforms is True
kushalkolar Feb 2, 2026
e1d40ba
update examples
kushalkolar Feb 2, 2026
096a51c
forgot
kushalkolar Feb 2, 2026
274d449
update test
kushalkolar Feb 2, 2026
8d776d4
example tests passing
kushalkolar Feb 2, 2026
fce7087
dereferencing test and fixes
kushalkolar Feb 3, 2026
44fdbb9
simplify texture array tests a bit
kushalkolar Feb 3, 2026
d090dca
image replace buffer tests pass yay
kushalkolar Feb 3, 2026
d6754d0
forgot a file
kushalkolar Feb 4, 2026
83b924e
comments, check image graphic
kushalkolar Feb 4, 2026
2237d51
add image reshaping example
kushalkolar Feb 4, 2026
630435e
add buffer replace imgui thing for manual testing
kushalkolar Feb 4, 2026
a87dfdf
black
kushalkolar Feb 4, 2026
30e87ad
dont call wgpu_obj.destroy(), seems to work and clear VRAM with norma…
kushalkolar Feb 4, 2026
6228d6c
slower changes
kushalkolar Feb 4, 2026
e207d5b
update
kushalkolar Feb 4, 2026
5c894c3
update example
kushalkolar Feb 4, 2026
7452fa8
fixes and tweaks for test
kushalkolar Feb 4, 2026
16c979d
remove unecessary stuff
kushalkolar Feb 4, 2026
68be2e0
update
kushalkolar Feb 4, 2026
cb85ac1
Merge branch 'main' into replaceable-buffers
kushalkolar Feb 4, 2026
500426d
docstrings
kushalkolar Feb 4, 2026
dd7a829
fix example
kushalkolar Feb 4, 2026
da54a9c
update example
kushalkolar Feb 4, 2026
eb7fbae
update example
kushalkolar Feb 4, 2026
2e8726f
update docs
kushalkolar Feb 4, 2026
fd87cae
Merge branch 'main' into replaceable-buffers
kushalkolar Feb 4, 2026
bf3041a
Merge branch 'ndwidget' into replaceable-buffers
kushalkolar Feb 4, 2026
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
docstrings
  • Loading branch information
kushalkolar committed Feb 4, 2026
commit 500426df70fbb895e21b21f7ffdecfbd04867112
10 changes: 9 additions & 1 deletion fastplotlib/graphics/_positions_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ class PositionsGraphic(Graphic):

@property
def data(self) -> VertexPositions:
"""Get or set the graphic's data"""
"""
Get or set the graphic's data.

Note that if the number of datapoints does not match the number of
current datapoints a new buffer is automatically allocated. This can
have performance drawbacks when you have a very large number of datapoints.
This is usually fine as long as you don't need to do it hundreds of times
per second.
"""
return self._data

@data.setter
Expand Down
10 changes: 9 additions & 1 deletion fastplotlib/graphics/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,15 @@ def _create_tiles(self) -> list[_ImageTile]:

@property
def data(self) -> TextureArray:
"""Get or set the image data"""
"""
Get or set the image data.

Note that if the shape of the new data array does not equal the shape of
current data array, a new set of GPU Textures are automatically created.
This can have performance drawbacks when you have a ver large images.
This is usually fine as long as you don't need to do it hundreds of times
per second.
"""
return self._data

@data.setter
Expand Down
8 changes: 8 additions & 0 deletions fastplotlib/graphics/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ def __init__(
overrides any argument passed to "colors". For supported colormaps see the
``cmap`` library catalogue: https://cmap-docs.readthedocs.io/en/stable/catalog/

color_mode: one of "auto", "uniform", "vertex", default "auto"
"uniform" restricts to a single color for all line datapoints.
"vertex" allows independent colors per vertex.
For most cases you can keep it as "auto" and the `color_mode` is determineed automatically based on the
argument passed to `colors`. if `colors` represents a single color, then the mode is set to "uniform".
If `colors` represents a unique color per-datapoint, or if a cmap is provided, then `color_mode` is set to
"vertex". You can switch between "uniform" and "vertex" `color_mode` after creating the graphic.

cmap_transform: 1D array-like of numerical values, optional
if provided, these values are used to map the colors from the cmap

Expand Down
3 changes: 3 additions & 0 deletions fastplotlib/graphics/line_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def __init__(
cmap_transform: 1D array-like of numerical values, optional
if provided, these values are used to map the colors from the cmap

color_mode: one of "auto", "uniform", "vertex", default "auto"
The color mode for each line in the collection. See `color_mode` in :class:`.LineGraphic` for details.

name: str, optional
name of the line collection as a whole

Expand Down
8 changes: 8 additions & 0 deletions fastplotlib/graphics/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ def __init__(
cmap_transform: 1D array-like or list of numerical values, optional
if provided, these values are used to map the colors from the cmap

color_mode: one of "auto", "uniform", "vertex", default "auto"
"uniform" restricts to a single color for all line datapoints.
"vertex" allows independent colors per vertex.
For most cases you can keep it as "auto" and the `color_mode` is determineed automatically based on the
argument passed to `colors`. if `colors` represents a single color, then the mode is set to "uniform".
If `colors` represents a unique color per-datapoint, or if a cmap is provided, then `color_mode` is set to
"vertex". You can switch between "uniform" and "vertex" `color_mode` after creating the graphic.

mode: one of: "markers", "simple", "gaussian", "image", default "markers"
The scatter points mode, cannot be changed after the graphic has been created.

Expand Down
Loading