MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.4k stars 308 forks source link

Fast pixel markers for CairoMakie #585

Open asinghvi17 opened 4 years ago

asinghvi17 commented 4 years ago

This came up when I ran the orbit diagram example in CairoMakie - it's horrifically slow, even for a PNG surface, just because of the sheer number of drawing ops.

We should implement a "fast pixel" marker by manually creating and mutating an image surface, and then drawing that on to the screen's surface.

SimonDanisch commented 4 years ago

Yeah makes sense! We should move the FastPixel marker to AbstractPlotting anyways! I just wrote @jkrumbiegel a lengthy explanation, how I really want to have all backend specific hacks still live in AbstractPlotting, so that AbstractPlotting is the only source of trueth and acts like all backends support the same features :D

asinghvi17 commented 4 years ago

That makes sense...if we can get all backends to support a fast pixel marker type, that would be perfect. I suppose the best way to do this would be to bin the scatter plot into rectangles, one per pixel. Would that be achievable by using project_position on the input points, rounding the output to Int, and then filling the appropriate cells?

SimonDanisch commented 4 years ago

That sounds doable ;)