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 Plots? #29

Open
wadehenning opened this issue May 19, 2020 · 2 comments
Open

Save Plots? #29

wadehenning opened this issue May 19, 2020 · 2 comments

Comments

@wadehenning
Copy link

Is there built-in functionality to save plots?

@dehann
Copy link
Member

dehann commented Aug 10, 2020

Hi @wadehenning , sorry did not see this until now. Not plots themselves, but you could perhaps just save the ::BallTreeDensity object with JLD2:

using KernelDensityEstimate, KernelDensityEstimatePlotting
p = kde!(randn(2,100))
pl = plotKDE(p)

using Gadfly
pl |> PDF("test.pdf")

using JLD2
@save "test.jld2" p

# ....
JLD2.@load "test.jld2" p
p |> plotKDE |> PDF("test2.pdf")

@dehann
Copy link
Member

dehann commented Aug 10, 2020

Actually, you might be able to save the pl object in the same way, although i haven't tried that myself yet:

JLD2.@save "test.jld2" p pl

#...
JLD2.@load "test.jld2" p pl
pl |> PDF("directsave.pdf")

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

2 participants