Quantization distortion in x-axis of GLMakie plot. Why?

Viewed 123

I create a simple plot using GLMakie:

GLMakie.scatter( range((-3e-9+1e-3)..(3e-9+1e-3),100), range(1..100,100) )

The result looks like this:

enter image description here

Looks like the x-axis is heavily quantized. The Plots package handles the same command just fine:

Plots.scatter( range((-3e-9+1e-3)..(3e-9+1e-3),100), range(1..100,100) )

enter image description here

GLMakie can also handle the same plot if the x range is centered on 0:

GLMakie.scatter( range((-5e-9)..(5e-9),100), range(1..100,100) )

enter image description here

Why is this happening? Does GLMakie use a smaller float for speed? Can I do anything to avoid this?

1 Answers
Related