Saving Makie plot as is on the screen?

I noticed that if I plot something with Makie, then zoom-pan in the GUI, then I save with Makie.save(), the originally plotted “version” will be saved. I understand this behaviour.
But, is there a way to save the plot as-is (after zooming, etc.)? For 3D shapes (which I am working with currently) that would be really convinient.

1 Like
scene.center = false
save("test.png", scene)

I should figure out a way how to make this behaviour the default, without changing the centering behaviour :wink:

4 Likes

Ohh, I didn’t thought that this is the same “issue” as here:
Moving camera then saving picture in Makie
And thank you for the quick answer!

1 Like

For future me, having the same problem, this is a current good solution:

2 Likes
     type Makie.Scene has no field `center`

Is there a new, equally simple way to do this? Did this approach also cover zoom or just center?

I don’t think there is at the moment. But LScene should probably get a center attribute that stops it from being auto-centered on display…

I also want to create many 3D plots. I will zoom and rotate each to same extent and save them. How to do it?

Setting update=false should solve this:

save("filename.png", fig, update=false)

I use this for 3D plots as well.

1 Like

I feel like I tried this when I saw you first suggest it, without it working. But I just tried it again and… success! Thanks.

1 Like