Methods
Index
AstroPlot.axis_cartesian
AstroPlot.axisid
AstroPlot.densitycurve
AstroPlot.distribution
AstroPlot.force
AstroPlot.lagrange_radii
AstroPlot.plot_lagrangeradii
AstroPlot.plot_lagrangeradii!
AstroPlot.plot_lagrangeradii90
AstroPlot.plot_lagrangeradii90!
AstroPlot.plot_makie
AstroPlot.plot_makie!
AstroPlot.plot_momentum
AstroPlot.plot_momentum_angular
AstroPlot.plot_peano
AstroPlot.plot_radii
AstroPlot.plot_radii!
AstroPlot.plot_scaleradius
AstroPlot.plot_slice
AstroPlot.png2video
AstroPlot.pos_from_center
AstroPlot.projection_density
AstroPlot.radialforce
AstroPlot.radialvel
AstroPlot.rotationcurve
AstroPlot.rotvel
AstroPlot.sortarrays!
AstroPlot.unicode_density
AstroPlot.unicode_force
AstroPlot.unicode_projection
AstroPlot.unicode_projection_density
AstroPlot.unicode_radialforce
AstroPlot.unicode_rotationcurve
AstroPlot.unicode_scatter
AstroPlot.unicode_slice
MosaicViews.mosaicview
UnicodePlots
AstroPlot.unicode_scatter
— Functionunicode_scatter(
data::Array{T<:AbstractPoint, N};
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.BrailleCanvas, _A}
unicode_scatter(
data::Array{T<:AbstractPoint, N},
u::Union{Nothing, Unitful.FreeUnits};
xaxis,
yaxis,
xlabel,
ylabel,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.BrailleCanvas, _A}
Scatter plot of points or particles in REPL
collection
: filter the type of particles
Keywords
xaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axis
Examples
julia> unicode_scatter(randn_pvector(100))
AstroPlot.unicode_density
— Functionunicode_density(data; ...) -> Any
unicode_density(
data,
units;
timestamp,
xlabel,
ylabel,
ts,
title,
savelog,
savefolder,
kw...
) -> Any
Plot radial mass density curve of spherically symmetric system in REPL
Keywords
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figuretimestamp
: print time on figure title
AstroPlot.unicode_force
— Functionunicode_force(
data;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.Canvas, _A}
unicode_force(
data,
units;
timestamp,
savelog,
savefolder,
xlabel,
ylabel,
ts,
title,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.Canvas, _A}
Plot acceleration magnitude distribution of spherically symmetric system in REPL
Keywords
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figuretimestamp
: print time on figure title
AstroPlot.unicode_radialforce
— Functionunicode_radialforce(
data;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.Canvas, _A}
unicode_radialforce(
data,
units;
timestamp,
savelog,
savefolder,
xlabel,
ylabel,
ts,
title,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.Canvas, _A}
Plot radial acceleration magnitude relative to center in REPL
Keywords
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figuretimestamp
: print time on figure title
Missing docstring for unicode_radialpotential
. Check Documenter's build log for details.
AstroPlot.unicode_rotationcurve
— Functionunicode_rotationcurve(data; ...) -> Any
unicode_rotationcurve(
data,
units;
timestamp,
section,
rmhead,
rmtail,
savelog,
savefolder,
xlabel,
ylabel,
ts,
title,
kw...
) -> Any
Plot rotation curve in REPL
Keywords
rmhead
: remove the firstrmhead
elements of result array. Useful to avoid improper data pointsrmtail
: remove the lastrmtail
elements of result array. Useful to avoid improper data pointssavelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log filesection::Int64
: number of bins. Default is floor(Int64, length(data)^0.5833333333333334)
AstroPlot.unicode_projection
— Functionunicode_projection(
ρ;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
unicode_projection(
ρ,
units;
xaxis,
yaxis,
xlabel,
ylabel,
zlabel,
title,
colormap,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
Plot 2D projection sum over one dimension.
Keywords
xaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurecolormap = :inferno
: color map ofheatmap
plot
AstroPlot.unicode_projection_density
— Functionunicode_projection_density(
mesh::MeshCartesianStatic;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
unicode_projection_density(
mesh::MeshCartesianStatic,
units;
xaxis,
yaxis,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
Plot 2D projection sum of mesh density over one dimension.
Keywords
xaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurecolormap = :inferno
: color map ofheatmap
plot
AstroPlot.unicode_slice
— Functionunicode_slice(
data::AbstractArray{T, 3},
n::Int64;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
unicode_slice(
data::AbstractArray{T, 3},
n::Int64,
units;
xaxis,
yaxis,
xlabel,
ylabel,
colormap,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
Plot 2D slice of a 3D array. Vector plot is not supported in unicode mode.
Keywords
xaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axiscolormap = :inferno
: color map ofheatmap
plot
unicode_slice(
m::MeshCartesianStatic,
symbol::Symbol,
n::Int64;
...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
unicode_slice(
m::MeshCartesianStatic,
symbol::Symbol,
n::Int64,
units;
xaxis,
yaxis,
kw...
) -> UnicodePlots.Plot{T, Val{_A}} where {T<:UnicodePlots.HeatmapCanvas, _A}
Plot 2D slice of 3D data symbol
in m
.
Keywords
xaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axiscolormap = :inferno
: color map ofheatmap
plot
GLMakie
AstroPlot.plot_makie
— Functionplot_makie(
data::Array{T<:PVector, 1};
...
) -> Makie.FigureAxisPlot
plot_makie(
data::Array{T<:PVector, 1},
u::Union{Nothing, Unitful.FreeUnits};
markersize,
markerspace,
size,
kw...
) -> Makie.FigureAxisPlot
Plot scatter
data points (in interactive mode)
collection
: filter the type of particles
Examples
d = randn_pvector(50)
plot_makie(d, nothing)
d = randn_pvector(50, u"km")
plot_makie(d, u"m")
plot_makie(
nodes::Array{T<:OctreeNode, N};
...
) -> Tuple{Makie.Figure, Any, MakieCore.Plot}
plot_makie(
nodes::Array{T<:OctreeNode, N},
u;
interactive,
kw...
) -> Tuple{Makie.Figure, Any, MakieCore.Plot}
Plot tree nodes in wireframe
mode
AstroPlot.plot_makie!
— Functionplot_makie!(fig, data::Array{T<:PVector, 1}; ...) -> Any
plot_makie!(
fig,
data::Array{T<:PVector, 1},
u::Union{Nothing, Unitful.FreeUnits};
markersize,
markerspace,
size,
kw...
) -> Any
Plot scatter
data points (in interactive mode)
collection
: filter the type of particles
Examples
d = randn_pvector(50)
plot_makie!(fig, d, nothing)
d = randn_pvector(50, u"km")
plot_makie!(fig, d, u"m")
plot_makie!(
axis,
nodes::AbstractArray{T<:OctreeNode, N};
...
)
plot_makie!(
axis,
nodes::AbstractArray{T<:OctreeNode, N},
u;
kw...
) -> Any
Plot tree nodes in wireframe
mode
AstroPlot.plot_peano
— Functionplot_peano() -> Any
plot_peano(bits::Int64) -> Any
Interactively plot Hilber-Peano curve with Makie
. It is recommanded that bits <= 6
to avoid lagging problems.
GLMakie
Missing docstring for projection
. Check Documenter's build log for details.
AstroPlot.projection_density
— Functionprojection_density(m::MeshCartesianStatic; ...)
projection_density(
m::MeshCartesianStatic,
units;
size,
xaxis,
yaxis,
xlabel,
ylabel,
title,
aspect_ratio,
kw...
)
Plot 2D projection sum of mesh density over one dimension.
Keywords
aspect_ratio
: aspect ratio of axes. Default is1.0
to avoid stretching. Pass toMakie
asAxisAspect(aspect_ratio)
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
AstroPlot.plot_slice
— Functionplot_slice(
m::MeshCartesianStatic,
symbol::Symbol,
n::Int64;
...
) -> Makie.Figure
plot_slice(
m::MeshCartesianStatic,
symbol::Symbol,
n::Int64,
units;
size,
xaxis,
yaxis,
xlabel,
ylabel,
title,
aspect,
kw...
) -> Makie.Figure
Plot 2D slice of 3D data symbol
in m
.
Keywords
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
aspect_ratio
: aspect ratio of axes. Default is1.0
to avoid stretching. Pass toMakie
asAxisAspect(aspect_ratio)
Video
AstroPlot.png2video
— Functionpng2video(
dir::String,
filenamebase::String,
suffix::String,
outfile::String;
encoder_options,
framerate,
codec_name
) -> Bool
Convert all figure end with suffix
to video. Filenames are organized as filenamebase0000suffix
. For png
files like pos_0000.png
, set filenamebase = "pos_"
and suffix = ".png"
It basically calls VideoIO.open_video_out
Keywords
encoder_options
: keywords supported byFFMPEG
. Default value(crf=23, preset="medium")
is suitable for most casesframerate
: fps (frame per second). Default24
codec_name
: name of video encoder. Defaultnothing
. Trylibx264
,libx265
,libx264rgb
and more options inFFMPEG
Examples
julia> png2video("output", "pos_", ".png", "test.mp4")
MosaicViews.mosaicview
— Functionmosaicview(
folder::String,
filenamebase::String,
Counts::Array,
suffix::String;
formatstring,
kw...
) -> Any
Arguments
folder
: directory holding snapshotsfilenamebase
,Counts
,suffix
: snapshots are commonly named assnapshot_0000.gadget2
, in this wayfilenamebase = "snapshot_"
,suffix = ".gadget2
.Counts
is an array to choose snapshots, and it is printed to formatted string (controled by keywordformatstring
) infor
loops.
Examples
julia> mosaicview("output", "pos_", collect(0:10:490), ".png"; fillvalue=0.5, npad=5, ncol=10, rowmajor=true)
mosaicview(
folder::String,
filenamebase::String,
suffix::String;
kw...
) -> Any
Plot all files matching filenamebase
and suffix
in folder
to mosaic view.
Tools
Analysis
AstroPlot.rotationcurve
— Functionrotationcurve(data; ...) -> NTuple{4, Vector}
rotationcurve(
data,
units;
rmhead,
rmtail,
section,
savelog,
savefolder
) -> NTuple{4, Vector}
Return Tuple(Rmean, Vmean, Rstd, Vstd)
, where mean
is mean value, std
means standard deviation.
Keywords
rmhead
: remove the firstrmhead
elements of result array. Useful to avoid improper data pointsrmtail
: remove the lastrmtail
elements of result array. Useful to avoid improper data pointssavelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log filesection::Int64
: number of bins. Default is floor(Int64, length(data)^0.5833333333333334)
AstroPlot.densitycurve
— Functiondensitycurve(data; ...) -> Tuple{Vector, Vector}
densitycurve(
data,
units;
savelog,
savefolder
) -> Tuple{Vector, Vector}
Compute radial mass density curve of spherically symmetric system
Keywords
savelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log file
AstroPlot.rotvel
— Functionrotvel(vel::PVector, pos::PVector) -> Any
Rotational velocity magnitude at pos
relative to origin.
AstroPlot.radialvel
— Functionradialvel(vel::PVector, pos::PVector) -> Any
Radial velocity magnitude at pos
relative to origin.
AstroPlot.force
— Functionforce(data; ...) -> Tuple{Any, Any}
force(data, units; savelog, savefolder) -> Tuple{Any, Any}
Compute acceleration magnitude distribution of spherically symmetric system
Keywords
savelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log file
AstroPlot.radialforce
— Functionradialforce(a0, acc, p0, pos) -> Any
Compute radial acceleration magnitude relative to center p0
radialforce(data; ...) -> Tuple{Any, Any}
radialforce(
data,
units;
savelog,
savefolder
) -> Tuple{Any, Any}
Compute radial acceleration magnitude relative to center
Keywords
savelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log file
Missing docstring for radialpotential
. Check Documenter's build log for details.
AstroPlot.distribution
— Functiondistribution(
x::Array,
y::Array;
section,
rmhead,
rmtail
) -> NTuple{4, Vector}
Compute how quantity y
is distributed along x
. For example, rotation velocity along radius. Return Tuple(xmean, ymean, xstd, ystd)
, where mean
is mean value, std
means standard deviation.
Keywords
section::Int64
: number of bins. Default is floor(Int64, length(data)^0.5833333333333334)rmhead
: remove the firstrmhead
elements of result array. Useful to avoid improper data pointsrmtail
: remove the lastrmtail
elements of result array. Useful to avoid improper data points
AstroPlot.pos_from_center
— Functionpos_from_center(
particles::AbstractArray{T<:AbstractParticle, 1}
) -> Any
pos_from_center(
particles::AbstractArray{T<:AbstractParticle, 1},
u
) -> Any
Return a unitless array of positions relative to the center.
AstroPlot.lagrange_radii
— Functionlagrange_radii(data) -> Tuple{Any, Any}
lagrange_radii(data, u) -> Tuple{Any, Any}
Return a Tuple
of scale radius and Lagrange radii. Designed for spherically symmetric systems.
Data processing
Missing docstring for pack_xy
. Check Documenter's build log for details.
AstroPlot.sortarrays!
— Functionsortarrays!(by::Array, another::Array; kw...)
Sort two arrays at the same time. kw
is passed to Base.sort!
.
Examples
julia> a = [1,3,2]
julia> b = ["a", "b", "c"]
julia> sortarrays!(a,b)
julia> a
3-element Vector{Int64}:
1
2
3
julia> b
3-element Vector{String}:
"a"
"c"
"b"
Missing docstring for pos_from_center
. Check Documenter's build log for details.
Meshes
AstroPlot.axisid
— Functionaxisid(axis::Symbol) -> Int64
Convert axis to Int
- return
1
ifaxis == :x
- return
2
ifaxis == :y
- return
3
ifaxis == :z
AstroPlot.axis_cartesian
— Functionaxis_cartesian(pos::StructArray, axis::Symbol) -> Any
Return 1D axis points of 3D Cartesian positions.
Missing docstring for slice3d
. Check Documenter's build log for details.
energy evolution
plot_energy
plot_energy_kinetic
plot_energy_potential
plot_energy_delta
plot_energy_delta!
kinetic_energy
sum_kinetic
sum_potential
momentum evolution
AstroPlot.plot_momentum
— Functionplot_momentum(
df::DataFrames.DataFrame;
uTime,
uMomentum,
title,
xlabel,
ylabel,
size,
legendposition,
axis,
colors,
kw...
) -> Tuple{Makie.Figure, DataFrames.DataFrame}
Plot total momentum in df
which contains columns named time
and momentum
Keywords
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
plot_momentum(
datafile::String;
kw...
) -> Tuple{Makie.Figure, DataFrames.DataFrame}
Plot total momentum in datafile
which is a CSV
file containing columns named time
and momentum
Keywords
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
plot_momentum(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType;
...
) -> Tuple{Tuple{Makie.Figure, DataFrames.DataFrame}, Tuple{Makie.Figure, DataFrames.DataFrame}}
plot_momentum(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units;
...
) -> Tuple{Tuple{Makie.Figure, DataFrames.DataFrame}, Tuple{Makie.Figure, DataFrames.DataFrame}}
plot_momentum(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units,
fileunits;
times,
savelog,
savefolder,
formatstring,
type,
kw...
) -> Tuple{Tuple{Makie.Figure, DataFrames.DataFrame}, Tuple{Makie.Figure, DataFrames.DataFrame}}
Plot total momentum and total angular momentum of particles in each snapshot.
Arguments
folder
: directory holding snapshotsfilenamebase
,Counts
,suffix
: snapshots are commonly named assnapshot_0000.gadget2
, in this wayfilenamebase = "snapshot_"
,suffix = ".gadget2
.Counts
is an array to choose snapshots, and it is printed to formatted string (controled by keywordformatstring
) infor
loops.times
: set time label of each snapshotFileType
: Trait argument to dispatch on different snapshot format. It is to be set manually because some output types cannot be deduced automaticallyu = u"kpc"
: length unit. Setu
asnothing
in unitless cases.
Keywords
formatstring
: formatted string to control snapshot index. Default is"%04d"
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
savelog::Bool
: if true, save processed data incsv
. The name of log file depends on analysis functionsavefolder
: set the directory to save log file
AstroPlot.plot_momentum_angular
— Functionplot_momentum_angular(
df::DataFrames.DataFrame;
uTime,
uMomentumAngular,
title,
xlabel,
ylabel,
size,
legendposition,
axis,
colors,
kw...
) -> Tuple{Makie.Figure, DataFrames.DataFrame}
Plot total angular momentum in df
which contains columns named time
and angularmomentum
Keywords
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
plot_momentum_angular(
datafile::String;
kw...
) -> Tuple{Makie.Figure, DataFrames.DataFrame}
Plot total angular momentum in datafile
which is a CSV
file containing columns named time
and angularmomentum
Keywords
size
: figure sizexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figurexlims
: set x-limit of the plot. Default isnothing
ylims
: set y-limit of the plot. Default isnothing
radii evolution
AstroPlot.plot_scaleradius
— Functionplot_scaleradius(
df::DataFrames.DataFrame,
uTime,
uLength;
xlabel,
ylabel,
title,
size,
legend,
kw...
) -> Makie.Figure
Plot evolution of scale radius by time. df
contains columns named Time
and ScaleRadius
Keywords
xlabel
: label of x-axisylabel
: label of y-axistitle
: title line of the figuresize
: figure size
AstroPlot.plot_lagrangeradii
— Functionplot_lagrangeradii(
df::DataFrames.DataFrame,
uTime,
uLength;
xlabel,
ylabel,
title,
colors,
size,
kw...
) -> Makie.Figure
Plot evolution of Lagrange radii by time. df
contains columns named Time
and L10
, L20
, ..., L100
Keywords
title
: title line of the figurexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axis
AstroPlot.plot_lagrangeradii!
— Functionplot_lagrangeradii!(
fig,
ax,
df::DataFrames.DataFrame;
colors,
legend,
kw...
) -> Tuple{Any, Vector{String}}
Plot evolution of Lagrange radii by time. df
contains columns named Time
and L10
, L20
, ..., L100
Keywords
title
: title line of the figurexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axis
AstroPlot.plot_lagrangeradii90
— Functionplot_lagrangeradii90(
df::DataFrames.DataFrame,
uTime,
uLength;
xlabel,
ylabel,
title,
size,
kw...
) -> Makie.Figure
Plot evolution of Lagrange radii by time. df
contains columns named Time
and L10
, L20
, ..., L90
L100
is omitted, because in most cases, those escaping particles may over distort the figure.
Keywords
title
: title line of the figurexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axis
AstroPlot.plot_lagrangeradii90!
— Functionplot_lagrangeradii90!(
fig,
ax,
df::DataFrames.DataFrame;
colors,
legend,
kw...
) -> Tuple{Any, Vector{String}}
Plot evolution of Lagrange radii by time. df
contains columns named Time
and L10
, L20
, ..., L90
L100
is omitted, because in most cases, those escaping particles may over distort the figure.
Keywords
title
: title line of the figurexaxis
:Symbol
to plot on x-axis. Default is:x
yaxis
:Symbol
to plot on y-axis. Defualt is:y
xlabel
: label of x-axisylabel
: label of y-axis
AstroPlot.plot_radii
— Functionplot_radii(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType;
...
) -> Tuple{Makie.Figure, Makie.Figure, DataFrames.DataFrame}
plot_radii(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units;
...
) -> Tuple{Makie.Figure, Makie.Figure, DataFrames.DataFrame}
plot_radii(
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units,
fileunits;
times,
savelog,
savefolder,
formatstring,
type,
kw...
) -> Tuple{Makie.Figure, Makie.Figure, DataFrames.DataFrame}
Plot scale radius and Lagrange radii (up to 90% by default)
Return Tuple(FigScale, FigLagrange, df)
. df
contains radii data
Arguments
folder
: directory holding snapshotsfilenamebase
,Counts
,suffix
: snapshots are commonly named assnapshot_0000.gadget2
, in this wayfilenamebase = "snapshot_"
,suffix = ".gadget2
.Counts
is an array to choose snapshots, and it is printed to formatted string (controled by keywordformatstring
) infor
loops.times
: set time label of each snapshotFileType
: Trait argument to dispatch on different snapshot format. It is to be set manually because some output types cannot be deduced automaticallyu = u"kpc"
: length unit. Setu
asnothing
in unitless cases.
Keywords
formatstring
: formatted string to control snapshot index. Default is"%04d"
Examples
julia> FigScale, FigLagrange, df = plot_radii(
joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(),
times = collect(0.0:0.01:0.1) * u"Gyr", title = "Radii plot")
AstroPlot.plot_radii!
— Functionplot_radii!(
AxisScale,
FigLagrange,
AxisLagrange,
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType;
...
) -> DataFrames.DataFrame
plot_radii!(
AxisScale,
FigLagrange,
AxisLagrange,
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units;
...
) -> DataFrames.DataFrame
plot_radii!(
AxisScale,
FigLagrange,
AxisLagrange,
folder::String,
filenamebase::String,
Counts::Vector{Int64},
suffix::String,
FileType::AbstractOutputType,
units,
fileunits;
times,
colors,
savelog,
savefolder,
formatstring,
type,
kw...
) -> DataFrames.DataFrame
Plot scale radius and Lagrange radii (up to 90% by default) Return radii data in Dict
Arguments
AxisScale
:Axis
of scale radius figureFigLagrange
: Lagrange radii figureAxisLagrange
:Axis
of Lagrange radii figurefolder
: directory holding snapshotsfilenamebase
,Counts
,suffix
: snapshots are commonly named assnapshot_0000.gadget2
, in this wayfilenamebase = "snapshot_"
,suffix = ".gadget2
.Counts
is an array to choose snapshots, and it is printed to formatted string (controled by keywordformatstring
) infor
loops.times
: set time label of each snapshotFileType
: Trait argument to dispatch on different snapshot format. It is to be set manually because some output types cannot be deduced automaticallyu = u"kpc"
: length unit. Setu
asnothing
in unitless cases.
Keywords
formatstring
: formatted string to control snapshot index. Default is"%04d"
Examples
julia> FigScale, FigLagrange, df = plot_radii(
joinpath(pathof(AstroPlot), "../../test/snapshots"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(),
times = collect(0.0:0.01:0.1) * u"Gyr", title = "Radii plot")
force distribution
plot_force
plot_force!
density distribution
Missing docstring for plot_density
. Check Documenter's build log for details.
Missing docstring for plot_density!
. Check Documenter's build log for details.