Plotting
Once we have text (#20) we can think about supporting plot-like visualizations. Some things that we'd need:
- Logic to determine the ticks.
- Grids (infinite, showing lines and sublines at predefined intervals).
- Colorbars.
- Labels, titles, legend.
- A layout engine.
More meta, where do we implement this all?
- In pygfx itself?
- In something like
pygfx.plot? - We don't. We provide the lower level primitives, and a higher level plotting lib would implement it.
Somewhat related to #178.
We don't. We provide the lower level primitives, and a higher level plotting lib would implement it.
This! :)
Maybe you can convince @rougier to give it a shot ;-)
We're on it actually. I like the idea of separating the lower level primitives from the higher level plotting API. But this requires some work on how to properly define the high level API such that it can benefits from the lower level primitives.
I'm wondering which low level primitives you were thinking of? In fastplotlib I recently took advantage of how buffer data, such as Geometry vertex color data, can be modified and then update_range() can be used to mark only those changes. For the user it's just slicing.
For example, with a line:

# slicing to change colors
cosine_graphic.colors[:15] = "magenta"
cosine_graphic.colors[70:] = "blue"
cosine_graphic.colors[60] = "w"
cosine_graphic.colors[25:55:3] = "cyan"
cosine_graphic.colors[75:90, 0] = np.linspace(0, 1, 15)

Events handlers can also be added to them:
cosine_graphic.colors.add_event_handler(print)
It's really nice that pygfx makes this possible :D