Plotting Functions
GADGETPlotting.birth_histogram_plot — Method
birth_histogram_plot(birth_data::Dict{String, Any}; <keyword arguments>)::Plots.PlotMake a histogram of the number of stars born at a certain radial distance.
Arguments
birth_data::Dict{String, Any}: Return value of theget_birth_placefunction.bins::Int64 = 50: Number of bins to use in the histogram.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.cmdf_plot — Method
cmdf_plot(
m_data::Dict{String, Any},
z_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a cumulative metallicity distribution function (CMDF) plot, for a given time step.
m_data and z_data must be in the same units.
Arguments
m_data::Dict{String, Any}: Return value of theget_massfunction.z_data::Dict{String, Any}: Return value of theget_metallicityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.bins::Int64: Number of subdivisions of the metallicity to construct the plot.x_norm::Bool = false: If the x axis will be normalized to its maximum value.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.cmdf_plot — Method
cmdf_plot(
m_data::Vector{Dict{String, Any}},
z_data::Vector{Dict{String, Any}},
time::Unitful.Quantity,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a cumulative metallicity distribution function (CMDF) plot of several datasets, for a given time step.
m_data and z_data must be in the same units.
Arguments
m_data::Vector{Dict{String, Any}}: Return values of theget_massfunction.z_data::Vector{Dict{String, Any}}: Return values of theget_metallicityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.labels::Array{String, 2}: Labels for the different simulations.bins::Int64: Number of subdivisions of the metallicity to construct the plot.x_norm::Bool = false: If the x axis will be normalized to its maximum value.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.compare_simulations_plot — Method
compare_simulations_plot(
data::Vector{Dict{String, Any}},
x_quantity::String,
y_quantity::String,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a plot comparing y_quantity vs. x_quantity of several simulations.
The data of each simulation must be in the same units, and x_quantity and y_quantity can be any magnitude used in the get_time_evolution function, namely:
- "scale_factor"
- "redshift"
- "clock_time" (Physical time)
- "sfr" (SFR)
- "sfr_prob" (SFR probability - Not normalized)
- "gas_number" (Gas particle number)
- "dm_number" (Dark matter particle number)
- "star_number" (Star number)
- "gas_mass" (Total gas mass)
- "dm_mass" (Total dark matter mass)
- "star_mass" (Total star mass)
- "gas_density" (Global gas density)
- "gas_frac" (Gas fraction)
- "dm_frac" (Dark matter fraction)
- "star_frac" (Star fraction)
- "gas_bar_frac" (Baryonic gas fraction)
- "star_bar_frac" (Baryonic star fraction)
Arguments
data::Vector{Dict{String,Any}}: Return value of theget_time_evolutionfunction for every simulation in a Vector, e.g. [data_sim1, data_sim2].x_quantity::String: Physical magnitude for the x axis.y_quantity::String: Physical magnitude for the y axis.labels::Array{String, 2}: Labels for the different simulations.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
smooth_data::Bool = false: If true a smoothing window with no weighs is applied to the y data. If false, no transformation occurs.bins::Int64 = 0: Number of subdivisions for the smoothing of the data, only relevant ifsmooth_data = true.legend_pos::Symbol = :bottomright: Position of the legend, e.g.:topleft.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.cpu_txt_plot — Function
cpu_txt_plot(
data::Dict{String, Matrix{Float64}};
<keyword arguments>
)::Plots.PlotMake a plot of the CPU usage of several processes (as percentages), from the data in the cpu.txt file.
Arguments
data::Dict{String, Matrix{Float64}}: Return values of theget_cpu_txtfunction.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.cpu_txt_plot — Function
cpu_txt_plot(
data::Vector{Dict{String, Matrix{Float64}}},
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a plot of a process' CPU usage (as percentages) for several simulations, from the data in the cpu.txt file.
If data contains more than ones process, only the first one will be used.
Arguments
data::Vector{Dict{String, Matrix{Float64}}}: Vector of return values of theget_cpu_txtfunction.labels::Array{String, 2}: Labels for the different simulations.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.density_histogram_plot — Method
density_histogram_plot(
density_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a histogram with the densities of the gas particles.
Arguments
density_data::Dict{String,Any}: Return value of theget_densityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.bins::Int64 = 20: Number of bins to use in the histogram.factor::Int64 = 0: Numerical exponent to scaledensity_data, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.y_scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.density_map_plot — Method
density_map_plot(
z::Union{Vector{Float64}, Nothing},
position_data::Dict{String, Any},
mass_data::Dict{String, Any},
density_data::Dict{String, Any}
hsml_data::Dict{String, Any};
<keyword arguments>
)::Plots.PlotMake a plot of the gas density in the x-y, x-z and/or y-z planes.
The axes are in the units given by position_data["unit"].
Arguments
z::Union{Vector{Float64}, Nothing}: Vector with the data to be mapped, ifnothingthe density will be mapped.position_data::Dict{String,Any}: Return value of theget_positionfunction.mass_data::Dict{String,Any}: Return value of theget_massfunction.density_data::Dict{String,Any}: Return value of theget_densityfunction.hsml_data::Dict{String,Any}: Return value of theget_hsmlfunction.plane::String = "All": String indicating which plane will be plotted."XY"⟹ x-y plane alone."XZ"⟹ x-z plane alone."YZ"⟹ y-z plane alone."All"⟹ The three planes in a single 1x3 figure.
axes::Bool = false: If true, the axes passing through (0, 0) are drawn. If false, no axes are drawn.axes_color::Symbol = :white: Color of the axes passing through (0, 0), only relevant ifaxes = true.color::Symbol = :inferno: Color scheme for the figure. Any one from ColorSchemes.jl can be used. Some good ones are:batlow,:bone,:CMRmap,:grayC,:seaborn_rocket_gradient,:YlOrRd_9and:inferno, which is the default.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.density_profile_plot — Method
density_profile_plot(
position_data::Dict{String, Any},
mass_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a density profile plot for a given time step.
Arguments
position_data::Dict{String, Any}: Return value of theget_positionfunction.mass_data::Dict{String, Any}: Return value of theget_massfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.density_profile_plot — Method
density_profile_plot(
position_data::Vector{Dict{String, Any}},
mass_data::Vector{Dict{String, Any}},
time::Unitful.Quantity,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a density profile plot comparing several datasets, for a given time step.
Arguments
position_data::Vector{Dict{String, Any}}: Vector of return values of theget_positionfunction.mass_data::Vector{Dict{String, Any}}: Vector of return values of theget_massfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.labels::Array{String, 2}: Labels for the different simulations.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.fatom_rho_plot — Method
fatom_rho_plot(
fatom_data::Vector{Float64},
density_data::Dict{String, Any},
time::Unitful.Quantity,
)::Plots.PlotMake a plot of atomic fraction vs. the density, for the gas particles at a given time step.
Arguments
fatom_data::Vector{Float64}: Return value of theget_fatomfunction.density_data::Dict{String, Any}: Return value of theget_densityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.fmol_Z_plot — Method
fmol_Z_plot(
fmol_data::Vector{Float64},
metallicity_data::Dict{String, Any},
mass_data::Dict{String, Any},
time::Unitful.Quantity,
)::Plots.PlotMake a plot of molecular fraction vs. the metallicity, for the gas particles at a given time step.
Arguments
fmol_data::Vector{Float64}: Return value of theget_fmolfunction.metallicity_data::Dict{String, Any}: Return value of theget_metallicityfunction.mass_data::Dict{String, Any}: Return value of theget_massfunction, for gas.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.fmol_fatom_plot — Method
fmol_fatom_plot(
fmol_data::Vector{Float64},
fatom_data::Vector{Float64},
density_data::Dict{String, Any},
metallicity_data::Dict{String, Any},
mass_data::Dict{String, Any},
time::Unitful.Quantity,
)::Plots.PlotMake a plot of molecular fraction vs. the metallicity, for the gas particles at a given time step.
Arguments
fmol_data::Vector{Float64}: Return value of theget_fmolfunction.fatom_data::Vector{Float64}: Return value of theget_fatomfunction.density_data::Dict{String, Any}: Return value of theget_densityfunction.metallicity_data::Dict{String, Any}: Return value of theget_metallicityfunction.mass_data::Dict{String, Any}: Return value of theget_massfunction, for gas.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.fraction_histogram_plot — Method
fraction_histogram_plot(
x_data::Vector{Float64},
time::Unitful.Quantity,
x_label::String;
<keyword arguments>
)::Plots.PlotMake a histogram with the molecular or atomic fractions of the gas particles.
Arguments
x_data::Vector{Float64}: Return value of theget_fmolorget_fatomfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.x_label::String: Label for the x axis.bins::Int64 = 20: Number of bins to use in the histogram.y_scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟶ no scaling.:log10⟶ logarithmic scaling.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.fraction_temp_plot — Method
fraction_temp_plot(
temperature_data::Dict{String, Any},
y_data::Vector{Float64},
time::Unitful.Quantity,
y_label::String,
)::Plots.PlotMake a plot of molecular or atomic fraction vs. $\mathrm{log}_{10}(T)$, for the gas particles at a given time step.
Arguments
temperature_data::Dict{String,Any}: Return value of theget_temperaturefunction.y_data::Dict{String, Any}: Return value of theget_fmolorget_fatomfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.y_label::String: Label for the y axis.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.gas_star_evolution_plot — Method
gas_star_evolution_plot(
index::Int64,
time_series::Dict{String, Any},
position_data::Dict{String, Any},
)::Plots.PlotMakes 3 plots, the position of the particles in the x-y plane, the baryonic fractional mass and the SFR. The first two for stars and gas. All in a single figure with a 1x2 layout.
The figure is created with the time running from 0 to time_series["clock_time"][index].
Arguments
index::Int64: Index of the final time step up to which the figure will show the evolution of the variables.time_series::Dict{String,Any}: Return value of theget_time_evolutionfunction.position_data::Dict{String,Any}: Return value of theget_positionfunction.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.kennicutt_schmidt_plot — Method
kennicutt_schmidt_plot(
gas_mass_data::Dict{String, Any},
temperature_data::Dict{String, Any},
star_mass_data::Dict{String, Any},
age_data::Dict{String, Any},
pos_data::Dict{String, Any},
temp_filter::Unitful.Quantity,
age_filter::Unitful.Quantity,
max_r::Unitful.Quantity,
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a plot of the Kennicutt-Schmidt law for a given snapshot, with the linear fit and the measured values superimposed for comparison.
Arguments
gas_mass_data::Dict{String, Any}: Return value of theget_massfunction, for gas.temperature_data::Dict{String, Any}: Return value of theget_temperaturefunction.star_mass_data::Dict{String, Any}: Return value of theget_massfunction, for stars.age_data::Dict{String, Any}: Return value of theget_agefunction.pos_data::Dict{String, Any}: Return value of theget_positionfunction.temp_filter::Unitful.Quantity: Maximum temperature allowed for the gas particles.age_filter::Unitful.Quantity: Maximum stellar age allowed.max_r::Unitful.Quantity: Maximum distance up to which the parameters will be calculated.time::Unitful.Quantity: Time with units for the time stamp of the plot.bins::Int64 = 50: Number of subdivisions of [0,max_r] to be used. It has to be at least 5.error_formating::String = "std_error": What to print as error values. The options are:"std_error"⟹ mean ± standard_error."conf_interval"⟹ mean ± max(upper_95% - mean, mean - lower_95%).
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.mass_profile_plot — Method
mass_profile_plot(
position_data::Dict{String, Any},
mass_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake an accumulated mass profile plot for a given time step.
Arguments
position_data::Dict{String, Any}: Return value of theget_positionfunction.mass_data::Dict{String, Any}: Return value of theget_massfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.mass_profile_plot — Method
mass_profile_plot(
position_data::Vector{Dict{String, Any}},
mass_data::Vector{Dict{String, Any}},
time::Unitful.Quantity,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake an accumulated mass profile plot of several datasets, for a given time step.
Arguments
position_data::Vector{Dict{String, Any}}: Return values of theget_positionfunction.mass_data::Vector{Dict{String, Any}}: Return values of theget_massfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.labels::Array{String, 2}: Labels for the different simulations.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.factor::Int64 = 0: Numerical exponent to scale the density, e.g. iffactor= 10 the y axis will be scaled by $10^{10}$. The default is no scaling.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.metallicity_profile_plot — Method
metallicity_profile_plot(
position_data::Dict{String, Any},
mass_data::Dict{String, Any},
z_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a metallicity profile plot for a given time step.
Arguments
position_data::Dict{String, Any}: Return value of theget_positionfunction.mass_data::Dict{String, Any}: Return value of theget_massfunction.z_data::Dict{String ,Any}: Return value of theget_metallicityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.metallicity_profile_plot — Method
metallicity_profile_plot(
position_data::Vector{Dict{String, Any}},
mass_data::Vector{Dict{String, Any}},
z_data::Vector{Dict{String, Any}},
time::Unitful.Quantity,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a metallicity profile plot comparing several datasets, for a given time step.
Arguments
position_data::Vector{Dict{String, Any}}: Return values of theget_positionfunction.mass_data::Vector{Dict{String, Any}}: Return values of theget_massfunction.z_data::Vector{Dict{String, Any}}: Return values of theget_metallicityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.labels::Array{String, 2}: Labels for the different simulations.scale::Symbol = :identity: Scaling to be used for the y axis. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
bins::Int64 = 100: Number of subdivisions of the region to be used for the profile.box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scaleposition_data["box_size"]if vacuum boundary conditions were used, and it will scaleposition_data["box_size"] / 2.0if periodic boundary conditions were used.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.quantities_2D_plot — Method
quantities_2D_plot(
data::Dict{String, Vector},
x_quantity::String,
y_quantity::String,
units::Dict{String, Unitful.FreeUnits{N, D, nothing} where {N, D}};
<keyword arguments>
)::Plots.PlotMake a plot comparing y_quantity vs. x_quantity, taken from the function quantities_2D.
Any of the following quantities can be use:
- "GAS" (Surface mass density of gas)
- "COLD_GAS" (Surface mass density of cold gas)
- "STARS" (Surface mass density of stars)
- "OH" (12 + log10(oxygenmass / hydrogenmass))
- "SFR" (Star formation rate surface density)
- "SSFR" (Specific star formation rate surface density)
- "SFE" (Star formation efficiency surface density)
- "P" (Proportional to the pressure)
- "Psi_FMOL" (Star formation rate per unit of molecular gas)
Arguments
data::Vector{Dict{String,Any}}: Return value of thequantities_2Dfunction.x_quantity::String: Physical magnitude for the x axis.y_quantity::String: Physical magnitude for the y axis.units::Dict{String, Unitful.FreeUnits{N, D, nothing} where {N, D}}: Dictionary with the units of the quantities indata. It has to have three keys: "mass", "length" and "time", each pointing to the corresponding unit.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.redshift_series_plot — Method
redshift_series_plot(time_series::Dict{String,Any}; <keyword arguments>)::Plots.PlotMake four line plots of the number of particles, the total mass, the baryonic fractional mass and the SFR, the first three for gas and stars. All in a single figure with a 2x2 layout.
All the plots show the evolution of the corresponding parameter versus the redshift.
Arguments
time_series::Dict{String,Any}: Return value of theget_time_evolutionfunction.mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. ifmass_factor= 10, the corresponding axis will be scaled by $10^{10}$.number_factor::Int64 = 0: Numerical exponent to scale the number of particles, e.g. ifnumber_factor= 4, the corresponding axis will be scaled by $10^4$.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.rho_temp_plot — Method
rho_temp_plot(
temperature_data::Dict{String, Any},
density_data::Dict{String, Any},
time::Unitful.Quantity,
)::Plots.PlotMake a plot of $\mathrm{log}_{10}(\rho) \ \mathrm{vs.} \ \mathrm{log}_{10}(T)$, for the gas particles at a given time step.
Arguments
temperature_data::Dict{String,Any}: Return value of theget_temperaturefunction.density_data::Dict{String, Any}: Return value of theget_densityfunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.scale_factor_series_plot — Method
scale_factor_series_plot(time_series::Dict{String,Any}; <keyword arguments>)::Plots.PlotMake four line plots of the number of particles, the total mass, the baryonic fractional mass and the SFR, the first three for gas and stars. All in a single figure with a 2x2 layout.
All the plots show the evolution of the corresponding parameter versus the scale factor.
Arguments
time_series::Dict{String,Any}: Return value of theget_time_evolutionfunction.mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. ifmass_factor= 10, the corresponding axis will be scaled by $10^{10}$.number_factor::Int64 = 0: Numerical exponent to scale the number of particles, e.g. ifnumber_factor= 4, the corresponding axis will be scaled by $10^4$.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.scatter_grid_plot — Method
scatter_grid_plot(position_data::Dict{String, Any})::Plots.PlotMake 9 scatter plots showing the positions of the gas, dark matter and stellar particles in the x-y, x-z and y-x planes.
The result is a single figure in a 3x3 layout with its axes in the unit given by position_data["unit"].
Arguments
position_data::Dict{String,Any}: Return value of theget_positionfunction.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.sfr_txt_plot — Method
sfr_txt_plot(
data::Dict{Union{Int64, String}, Any},
x_axis::Int64,
y_axis::Vector{Int64};
<keyword arguments>
)::Plots.PlotMake a plot of columns y_axis vs. column x_axis for the data in the sfr.txt file.
This function takes a modified version of sfr.txt which is produced by a private version of GADGET3. GADGET4 produces a sfr.txt, but it is not compatible with this function.
Arguments
data::Dict{Union{Int64, String}, Any}: Return values of theget_sfr_txtfunction.x_axis::Int64: Column number for the x axis.y_axis::Vector{Int64}: Vector of columns numbers for the y axis.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.bins::Int64 = 0: Number of subdivisions for the smoothing of the data. The default isInf, i.e. no smoothing.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.min_filter::NTuple{2, Float64} = (-Inf, -Inf): Value filter for the x and y axes. If a value of the x data is lower thanmin_filter[1], then it is deleted. Equivalently with the y axis andmin_filter[2]. The default is-Inffor both, i.e. no filtering.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.sfr_txt_plot — Method
sfr_txt_plot(
data::Vector{Dict{Union{Int64, String}, Any}},
x_axis::Int64,
y_axis::Int64,
labels::Array{String, 2};
<keyword arguments>
)::Plots.PlotMake a plot comparing column y_axis vs. column x_axis for the data in the sfr.txt file of several simulations.
This function takes a modified version of sfr.txt which is produced by a private version of GADGET3. GADGET4 produces a sfr.txt, but it is not compatible with this function.
Arguments
data::Vector{Dict{Union{Int64, String}, Any}}: Vector of return values of theget_sfr_txtfunction.x_axis::Int64: Column number for the x axis.y_axis::Int64: Column number for the y axis.labels::Array{String, 2}: Labels for the different simulations.title::String = "": Title for the figure. If an empty string is given no title is printed, which is the default.bins::Int64 = 0: Number of subdivisions for the smoothing of the data. The default isInf, i.e. no smoothing.scale::NTuple{2, Symbol} = (:identity, :identity): Scaling to be used for the x and y axes. The two options are::identity⟹ no scaling.:log10⟹ logarithmic scaling.
x_factor::Int64 = 0: Numerical exponent to scale thex_quantity, e.g. ifx_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.y_factor::Int64 = 0: Numerical exponent to scale they_quantity, e.g. ify_factor= 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.min_filter::NTuple{2, Float64} = (-Inf, -Inf): Value filter for the x and y axes. If a value of the x data is lower thanmin_filter[1], then it is deleted. Equivalently with the y axis andmin_filter[2]. The default is-Inffor both, i.e. no filtering.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.star_map_plot — Method
star_map_plot(position_data::Dict{String,Any}; <keyword arguments>)::Plots.PlotMake a plot of the stellar density in the x-y, x-z and/or y-z planes.
The axes are in the units given by position_data["unit"].
Arguments
position_data::Dict{String,Any}: Return value of theget_positionfunction.plane::String="All": String indicating which plane will be plotted."XY"⟹ x-y plane alone."XZ"⟹ x-z plane alone."YZ"⟹ y-z plane alone."All"⟹ The three planes in a single 1x3 figure.
box_factor::Float64 = 1.0: Multiplicative factor for the plotting region. It will scalepositions["box_size"]if vacuum boundary conditions were used, and it will scalepositions["box_size"] / 2if periodic boundary conditions were used.axes::Bool = false: If true, the axes passing through (0, 0) are drawn. If false, no axes are drawn.axes_color::Symbol = :white: Color of the axes passing through (0, 0), only relevant ifaxes = true.color::Symbol = :inferno: Color scheme for the figure. Any one from ColorSchemes.jl can be used. Some good ones are:batlow,:bone,:CMRmap,:grayC,:seaborn_rocket_gradient,:YlOrRd_9and:inferno, which is the default.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.temperature_histogram_plot — Method
temperature_histogram_plot(
temperature_data::Dict{String, Any},
time::Unitful.Quantity;
<keyword arguments>
)::Plots.PlotMake a histogram of the logarithm of the gas particles' temperatures.
Arguments
temperature_data::Dict{String,Any}: Return value of theget_temperaturefunction.time::Unitful.Quantity: Time with units for the time stamp of the plot. All available time units in Unitful and UnitfulAstro can be used, e.g. UnitfulAstro.Myr.bins::Int64 = 20: Number of bins to use in the histogram.
Returns
- The plot generated by the GR backend of Plots.jl.
GADGETPlotting.time_series_plot — Method
time_series_plot(time_series::Dict{String, Any}; <keyword arguments>)::Plots.PlotMake four line plots of the number of particles, the total mass, the baryonic fractional mass and the SFR, the first three for gas and stars. All in a single figure with a 2x2 layout.
All the plots show the evolution of the corresponding parameter versus time.
Arguments
time_series::Dict{String,Any}: Return value of theget_time_evolutionfunction.mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. ifmass_factor= 10, the corresponding axis will be scaled by $10^{10}$.number_factor::Int64 = 0: Numerical exponent to scale the number of particles, e.g. ifnumber_factor= 4, the corresponding axis will be scaled by $10^4$.
Returns
- The plot generated by the GR backend of Plots.jl.