Skip to content

Commit

Permalink
fix Makie new API
Browse files Browse the repository at this point in the history
  • Loading branch information
islent committed Jul 7, 2024
1 parent c5841fe commit e0c1dbf
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/analyse/density.jl
Original file line number Diff line number Diff line change
@@ -41,8 +41,10 @@ function unicode_density(data, units = uAstro;
ylabel = "Mass" * axisunit(getuMass(units)),
ts = isnothing(timestamp) ? "" : @sprintf(" at %.6f ", ustrip(timestamp)) * string(unit(timestamp)),
title = "Rotation Curve" * ts,
savelog = true,
savefolder = pwd(),
kw...)
Rmean, Mmean = densitycurve(data, units)
Rmean, Mmean = densitycurve(data, units; savelog, savefolder)
UnicodePlots.lineplot(Rmean, Mmean; xlabel, ylabel, title, kw...)
end

6 changes: 3 additions & 3 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
)

plot_positionslice(joinpath(foldertest, "mosaic/"), "snapshot_", collect(1:9:100), ".gadget2", gadget2(),
dpi = 300, size = (800,800),
size = (800,800),
xlims = (-0.06, +0.06), ylims = (-0.06, +0.06),
times = collect(0.0:0.00005:0.005) * u"Gyr",
)
@@ -55,7 +55,7 @@
png2video(joinpath(foldertest, "mosaic/"), "pos_", ".png", joinpath(foldertest, "TDE.mp4"))

unicode_scatter(d, nothing)
unicode_density(d, nothing)
unicode_rotationcurve(d, nothing)
unicode_density(d, nothing, savefolder = foldertest)
unicode_rotationcurve(d, nothing, savefolder = foldertest)
end
end
4 changes: 2 additions & 2 deletions src/snapshots/positions.jl
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ $_common_keyword_aspect
## Examples
```jl
julia plot_positionslice(joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(), dpi = 300, size = (800,800),
julia plot_positionslice(joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(), size = (800,800),
xlims = (-0.05, +0.05), ylims = (-0.05, +0.05), times = collect(0.0:0.01:0.1) * u"Gyr")
```
"""
@@ -230,7 +230,7 @@ $_common_keyword_aspect
## Examples
```jl
julia> plot_positionslice_adapt(joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(),
dpi = 300, size = (800,800), xlen = 0.1, ylen = 0.1, times = collect(0.0:0.01:0.1) * u"Gyr")
size = (800,800), xlen = 0.1, ylen = 0.1, times = collect(0.0:0.01:0.1) * u"Gyr")
```
"""
function plot_positionslice_adapt(folder::String, filenamebase::String, Counts::Array{Int64,1},
2 changes: 1 addition & 1 deletion src/snapshots/trajectory.jl
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ $_common_keyword_aspect
## Examples
```jl
julia fig, pos = plot_trajectory(joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200),
[1,2,3], ".gadget2", gadget2(), dpi = 300, size = (800,800))
[1,2,3], ".gadget2", gadget2(), size = (800,800))
```
"""
function plot_trajectory(folder::String, filenamebase::String, Counts::Array{Int64,1},
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ end

@testset "Mosaic view" begin
plot_positionslice("mosaic/", "snapshot_", collect(1:9:100), ".gadget2", gadget2(),
dpi = 300, size = (800,800),
size = (800,800),
xlims = (-0.06, +0.06), ylims = (-0.06, +0.06),
times = collect(0.0:0.00005:0.005) * u"Gyr",
)

2 comments on commit e0c1dbf

@islent
Copy link
Member Author

@islent islent commented on e0c1dbf Jul 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • fix precompile output dir [skip ci] c5841fe
  • fix Makie new API e0c1dbf

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/110578

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" e0c1dbf78e4b59a7631dfda9c6ef80798f462a09
git push origin v0.1.3

Please sign in to comment.