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

Loss of precision when plotting large floats in Makie #1196

Closed
malthesr opened this issue Aug 4, 2021 · 4 comments
Closed

Loss of precision when plotting large floats in Makie #1196

malthesr opened this issue Aug 4, 2021 · 4 comments

Comments

@malthesr
Copy link

malthesr commented Aug 4, 2021

I posted an issue to the Julia discourse, and the helpful replies there seem to suggest that this may be a bug in (or downstream from?) Makie, so I figured I'd file an issue here also since I couldn't find a duplicate in the issue tracker.

For completeness, I'll repeat my issue here: I'm doing something which I've reduced to:

using GLMakie

fig = Figure()
ax = Axis(fig[1, 1])

x = (0.1:0.1:10) .+ 1e7
y = 1:100

scatter!(ax, x, y)

save("example.png", fig)

This produces:

image

Whereas I'd expected a straight line. As johnmyleswhite points out in the discourse, the loss of precision is not in the data itself, but seems to happen somewhere along the plotting machinery.

I'm running Makie 0.15.0 with Julia 0.16.2 on Manjaro Linux.

Thank you for the library, I've found it very enjoyable to use.

@klaff
Copy link

klaff commented Sep 7, 2021

I just ran into this when plotting oscilloscope data. 5s offset in time value with 100e-9 resolution. eps(5f0) gives 477e-9, and accordingly I'm getting 4 or 5 data points mashed together at common x-axis locations.

@ffreyer
Copy link
Collaborator

ffreyer commented Sep 8, 2021

See also #780, #931

SynapticSage added a commit to SynapticSage/NeuroMetrics.jl that referenced this issue Apr 8, 2022
…Possibly what's mentioned here: MakieOrg/Makie.jl#1196 .. Attempting to get around by reducing size of time floats
@Enlil50
Copy link

Enlil50 commented Mar 6, 2024

Hi, I just ran in the same issue.

Is it possible to solve it for GLMakie too?
I want to use the interactive GUI.

Related: https://discourse.julialang.org/t/glmakie-vs-plots-not-enogh-precision-for-axis-limits/111249

@asinghvi17
Copy link
Member

Looks fixed on 0.21
iTerm2 ilN586

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

5 participants