Problem with the scaling of the plot axes in GLMakie

I am trying to make a plot in GLMakie but when I try, the “y” axis does not scale correctly and then I only get a straight line when it is not what I want, the Plots package does not have this problem but I am learning to use GLMakie and I would like to Know if anyone knows how to solve it.

The data example I am using is the following:

A = [-1.823184134007678e7
 -1.8231841662298784e7
 -1.8231841686912097e7
 -1.823184146238472e7
 -1.823184160335322e7
 -1.8231841514742956e7
 -1.8231841202577826e7
 -1.8231841469300713e7
 -1.823184146771717e7
 -1.8231841680206444e7
 -1.8231841510146353e7
 -1.8231841622727346e7
 -1.8231841495620362e7
 -1.8231841632055134e7
 -1.8231841493484516e7
 -1.8231841701837692e7
 -1.8231841513957992e7
 -1.8231841459460814e7
 -1.8231841535179164e7
 -1.82318415749508e7]
scatter(A)

This is an example of what I get, (in the graph there are 58 elements of the array but I only pass 20 elements for practicality)

Your values are all very close together, so the Float32 precision that GLMakie converts to for the gpu is not enough. This is a well known problem in Makie currently, the workaround is to rescale your data so it can be represented in Float32. We have ideas for more general solutions for the future but those need more time.

1 Like

Thank you very much, I already imagined something like this.