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

save(...; update=false) removed in 0.16 #1568

Closed
t-bltg opened this issue Jan 9, 2022 · 5 comments
Closed

save(...; update=false) removed in 0.16 #1568

t-bltg opened this issue Jan 9, 2022 · 5 comments

Comments

@t-bltg
Copy link
Collaborator

t-bltg commented Jan 9, 2022

Using [email protected]:
#1393 removed the ability to save a figure without updating it (e.g. zoomed in figure) which was added in #1118.
The keyword update is still present in the docstring though.

May I ask why this was removed and what is the alternative now ?

@t-bltg t-bltg changed the title save(...; update=false) got removed save(...; update=false) removed in 0.16 Jan 9, 2022
@SimonDanisch
Copy link
Member

It should now never call update/center! on save, so any zoom/pan operation should be preserved.
If one wants the old behavior of update=true, one needs to call center!(scene) manually, to reset the zoom...

@t-bltg t-bltg mentioned this issue Jan 9, 2022
1 task
@t-bltg
Copy link
Collaborator Author

t-bltg commented Jan 9, 2022

Thanks for the explanation.

@edljk
Copy link
Contributor

edljk commented Jan 18, 2022

Using Makie v0.16.1 and GLMakie v0.5.0
The following classical way to save a figure is ok

using GLMakie
xs = cos.(1:0.5:20)
ys = sin.(1:0.5:20)
zs = LinRange(0, 3, length(xs))
meshscatter(xs, ys, zs, markersize = 0.1, color = zs)
Makie.save("/tmp/test1.png", Makie.current_figure())

but the more recent way (from the documentation)

using GLMakie
xs = cos.(1:0.5:20)
ys = sin.(1:0.5:20)
zs = LinRange(0, 3, length(xs))
fig = Figure()
meshscatter(xs, ys, zs, markersize = 0.1, color = zs)
Makie.save("/tmp/test2.png", fig)

produces a blank image since the last fig call seams to clear the scene..

@SimonDanisch
Copy link
Member

What's the problem? That's the expected behaviour, you're not plotting into that fig with meshscatter

@edljk
Copy link
Contributor

edljk commented Jan 18, 2022

Oups, sorry, all my apologize

using GLMakie
xs = cos.(1:0.5:20)
ys = sin.(1:0.5:20)
zs = LinRange(0, 3, length(xs))
fig = Figure()
meshscatter(fig[1, 1], xs, ys, zs, markersize = 0.1, color = zs)
Makie.save("/tmp/test3.png", fig)

is perfectly ok. My mistake

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

3 participants