-
Notifications
You must be signed in to change notification settings - Fork 5
Makie.jl
integration
#171
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
Comments
Howdy, are y'all still looking for some contributions to this? We've started some similar work over in JuliaAstro/DustExtinction.jl#58 |
Hello! Yes thank you for reaching out, contributions are very much welcome! It might also be cool for us to come up with some base packages for us to share common types, plot recipes, etc. |
Oh dope, looks like SciML already did this in SciML/SciMLBase.jl#611 Besides ensemble plots (SciML/SciMLBase.jl#697 (comment)), it looks like most things should work out of the box. I took a quick crack at translating the examples in https://github.com/JuliaAstro/GeneralAstrodynamics.jl/blob/main/lib/AstrodynamicalSolvers/docs/src/index.md for your review here: https://icweaver.github.io/GeneralAstrodynamics.jl/notebook.html Preview:Plots.jl comparisonfigure = Pl.plot(;
aspect_ratio = 1.0,
background = :transparent,
grid = true,
title = "Unstable and Stable Invariant Manifolds",
)
Pl.plot!(figure, unstable, idxs=(:x, :y), aspect_ratio=1, label=:none, palette=:blues)
Pl.plot!(figure, stable, idxs=(:x, :y), aspect_ratio=1, label=:none, palette=:blues)
Pl.scatter!(figure, [1-μ], [0], label="Moon", xlabel="X (Earth-Moon Distance)", ylabel="Y (Earth-Moon Distance)", marker=:x, color=:black, markersize=10,) Makie.jlfig = Figure(size=(800, 400), fontsize=20)
ax = Axis(fig[1, 1];
xreversed = true,
aspect = DataAspect(),
xlabel = "X (Earth-Moon Distance)",
ylabel = "Y (Earth-Moon Distance)",
# labelsize = 12,
title = "Unstable and Stable Invariant Manifolds",
titlesize = 24,
)
cmap = resample_cmap(:blues, length(unstable))
for (i, m) in enumerate(unstable)
plot!(ax, m; idxs=(:x, :y), color=cmap[i])
end
cmap = resample_cmap(:blues, length(stable))
for (i, m) in enumerate(stable)
plot!(ax, m; idxs=(:x, :y), color=cmap[i])
end
scatter!(ax, [1-μ], [0]; marker=:x, color=:black, markersize=50, label="Moon")
fig I have exactly zero experience with the SciML ecosystem, so my b if you had something else in mind 😅 |
This looks great! Thanks for sharing and figuring this out. I do hope to continue to use SciML under the hood here, so I think using their built-in Otherwise, I'll try to take another swing at updating documentation this weekend. This package is in the tail end of a major refactor, and I'm hoping to clean everything up and re-document the packages this year. |
Thanks! For sure, just opened #236 |
Right now plotting functions and visualizations use
Plots
, which is great, but there should also beMakie
integration.The text was updated successfully, but these errors were encountered: