Skip to content
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

Switch to pygfx? #138

Open
schlegelp opened this issue Dec 26, 2023 · 1 comment
Open

Switch to pygfx? #138

schlegelp opened this issue Dec 26, 2023 · 1 comment

Comments

@schlegelp
Copy link
Collaborator

schlegelp commented Dec 26, 2023

pygfx is starting to stabilize (binaries, documentation, features, etc.). I ran some tests and it's impressively fast:

  • large FlyWire neuron with 6.9M faces at 30fps (with vispy I get around 3fps)
  • 844 FlyWire Kenyon cells with a total of 51.4M faces at ~8fps - slow but still useable

Should at some point look into whether we can replace vispy.

@schlegelp
Copy link
Collaborator Author

schlegelp commented Jan 25, 2024

Ran some more tests and I'm really happy with performance.

WIP in this branch: https://github.com/navis-org/navis/tree/pygfx

TODOs:

  • implement conversion of navis into pygfx objects (aiming for ~ feature parity)
  • figure out how to make the viewer non-blocking from ipython REPL (check how fastplotlib does it)
  • test in Jupyter environments (via jupyter_rfb)
  • expose pygfx backend through plot3d()

Extension aims:

  • refactor plotting backends to reduce redundancy (I'm thinking a Plotter abstract base class and subclasses of PlotterPlotly, PlotterMatplotlib, etc)
  • consider replacing matplotlib with pygfx for 2d plots (see this example for SVG exports)

Update [08/04/2024]:

I offloaded the new Viewer into a separate, general purpose library called Octarine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant