Makie.jl: High resolution scenes get cropped when saving to PNG

Created on 18 Feb 2020  路  13Comments  路  Source: JuliaPlots/Makie.jl

I'm not sure if this is a bug, but it's something I need to find a workaround for. I posted to discourse here but so far no responses.

Slight modification of the line demo in the docs to save to a high resolution PNG:

using Makie

x = range(0, stop = 2pi, length = 40)
f(x) = sin.(x)
y = f(x)
scene = lines(x, y, color = :blue; resolution=(5000,3000));
Makie.save("out.png", scene)

The resulting PNG is cropped to 3844x2124 (roughly my screen resolution) and shows just the lower left of the full scene. If I display the scene in a window I get the full scene rescaled to my screen resolution. Same result in 0.9.5 and master.

If this is a bug, can you suggest a workaround for how I can save scenes (actually produced using GeoMakie) to an image at very high resolution?

All 13 comments

On what os is this?

Forgot to mention, sorry. Windows 10, Julia 1.3.1.

image
Can't reproduce on linux + REPL...Where are you executing this?

I've tried this example in the REPL and similar GeoMakie code inside a project of mine, same result.

Hm, I can test later on windows

OK, thanks. I just confirmed that saving large PNGs using Images.jl works fine, so the problem does appear to be in the Makie/Plotting ecosystem somewhere.

using Images
img = Gray.(rand(5000,3000))
save("gray.png", img)

can reproduce this on windows... Will try to take a look later!

https://discourse.glfw.org/t/can-i-create-a-window-larger-than-the-monitor-resolution/951/2

Hm, seems like the window manager is allowed to overwrite this... I'll need to figure out how the answer can be applied in Makie...

Thanks for the quick bugfix work! To use it, do I just add GLMakie#master and sit back or are other steps needed?

Yep, that's all you have to do.

Let me know if that fixes it

It did, thank you again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SebastianM-C picture SebastianM-C  路  3Comments

AlexisRenchon picture AlexisRenchon  路  3Comments

tshort picture tshort  路  5Comments

phlavenk picture phlavenk  路  6Comments

mschauer picture mschauer  路  4Comments