Skip to content

Loss of precision when plotting large floats in Makie #1196

@malthesr

Description

@malthesr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions