Plotting Functions

GADGETPlotting.birth_histogram_plotMethod
birth_histogram_plot(birth_data::Dict{String, Any}; <keyword arguments>)::Plots.Plot

Make a histogram of the number of stars born at a certain radial distance.

Arguments

  • birth_data::Dict{String, Any}: Return value of the get_birth_place function.
  • bins::Int64 = 50: Number of bins to use in the histogram.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.cmdf_plotMethod
cmdf_plot(
    m_data::Dict{String, Any}, 
    z_data::Dict{String, Any},
    time::Unitful.Quantity;
    <keyword arguments>
)::Plots.Plot

Make 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 the get_mass function.
  • z_data::Dict{String, Any}: Return value of the get_metallicity function.
  • 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.
source
GADGETPlotting.cmdf_plotMethod
cmdf_plot(
    m_data::Vector{Dict{String, Any}}, 
    z_data::Vector{Dict{String, Any}},
    time::Unitful.Quantity,
    labels::Array{String, 2};
    <keyword arguments>
)::Plots.Plot

Make 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 the get_mass function.
  • z_data::Vector{Dict{String, Any}}: Return values of the get_metallicity function.
  • 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.
source
GADGETPlotting.compare_simulations_plotMethod
compare_simulations_plot(
    data::Vector{Dict{String, Any}},
    x_quantity::String,
    y_quantity::String,
    labels::Array{String, 2}; 
    <keyword arguments>
)::Plots.Plot

Make 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 the get_time_evolution function 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 the x_quantity, e.g. if x_factor = 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.
  • y_factor::Int64 = 0: Numerical exponent to scale the y_quantity, e.g. if y_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 if smooth_data = true.
  • legend_pos::Symbol = :bottomright: Position of the legend, e.g. :topleft.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.cpu_txt_plotFunction
cpu_txt_plot(
    data::Vector{Dict{String, Matrix{Float64}}},
    labels::Array{String, 2}; 
    <keyword arguments>
)::Plots.Plot

Make 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 the get_cpu_txt function.
  • 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.
source
GADGETPlotting.cpu_txt_plotFunction
cpu_txt_plot(
    data::Dict{String, Matrix{Float64}}; 
    <keyword arguments>
)::Plots.Plot

Make 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 the get_cpu_txt function.
  • 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.
source
GADGETPlotting.density_histogram_plotMethod
density_histogram_plot(
    density_data::Dict{String, Any},
    time::Unitful.Quantity; 
    <keyword arguments>
)::Plots.Plot

Make a histogram with the densities of the gas particles.

Arguments

  • density_data::Dict{String,Any}: Return value of the get_density function.
  • 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 scale density_data, e.g. if factor = 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.
source
GADGETPlotting.density_map_plotMethod
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.Plot

Make 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, if nothing the density will be mapped.
  • position_data::Dict{String,Any}: Return value of the get_position function.
  • mass_data::Dict{String,Any}: Return value of the get_mass function.
  • density_data::Dict{String,Any}: Return value of the get_density function.
  • hsml_data::Dict{String,Any}: Return value of the get_hsml function.
  • 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 if axes = 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_9 and :inferno, which is the default.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.density_profile_plotMethod
density_profile_plot(
    position_data::Dict{String, Any},
    mass_data::Dict{String, Any},
    time::Unitful.Quantity; 
    <keyword arguments>
)::Plots.Plot

Make a density profile plot for a given time step.

Arguments

  • position_data::Dict{String, Any}: Return value of the get_position function.
  • mass_data::Dict{String, Any}: Return value of the get_mass function.
  • 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. if factor = 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.density_profile_plotMethod
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.Plot

Make a density profile plot comparing several datasets, for a given time step.

Arguments

  • position_data::Vector{Dict{String, Any}}: Vector of return values of the get_position function.
  • mass_data::Vector{Dict{String, Any}}: Vector of return values of the get_mass function.
  • 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. if factor = 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.fatom_rho_plotMethod
fatom_rho_plot(
    fatom_data::Vector{Float64},
    density_data::Dict{String, Any},
    time::Unitful.Quantity,
)::Plots.Plot

Make 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 the get_fatom function.
  • density_data::Dict{String, Any}: Return value of the get_density function.
  • 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.
source
GADGETPlotting.fmol_Z_plotMethod
fmol_Z_plot(
    fmol_data::Vector{Float64},
    metallicity_data::Dict{String, Any},
    mass_data::Dict{String, Any},
    time::Unitful.Quantity,
)::Plots.Plot

Make 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 the get_fmol function.
  • metallicity_data::Dict{String, Any}: Return value of the get_metallicity function.
  • mass_data::Dict{String, Any}: Return value of the get_mass function, 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.
source
GADGETPlotting.fmol_fatom_plotMethod
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.Plot

Make 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 the get_fmol function.
  • fatom_data::Vector{Float64}: Return value of the get_fatom function.
  • density_data::Dict{String, Any}: Return value of the get_density function.
  • metallicity_data::Dict{String, Any}: Return value of the get_metallicity function.
  • mass_data::Dict{String, Any}: Return value of the get_mass function, 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.
source
GADGETPlotting.fraction_histogram_plotMethod
fraction_histogram_plot(
    x_data::Vector{Float64},
    time::Unitful.Quantity,
    x_label::String; 
    <keyword arguments>
)::Plots.Plot

Make a histogram with the molecular or atomic fractions of the gas particles.

Arguments

  • x_data::Vector{Float64}: Return value of the get_fmol or get_fatom function.
  • 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.
source
GADGETPlotting.fraction_temp_plotMethod
fraction_temp_plot(
    temperature_data::Dict{String, Any},
    y_data::Vector{Float64},
    time::Unitful.Quantity,
    y_label::String,
)::Plots.Plot

Make 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 the get_temperature function.
  • y_data::Dict{String, Any}: Return value of the get_fmol or get_fatom function.
  • 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.
source
GADGETPlotting.gas_star_evolution_plotMethod
gas_star_evolution_plot(
    index::Int64,
    time_series::Dict{String, Any},
    position_data::Dict{String, Any}, 
)::Plots.Plot

Makes 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 the get_time_evolution function.
  • position_data::Dict{String,Any}: Return value of the get_position function.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.kennicutt_schmidt_plotMethod
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.Plot

Make 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 the get_mass function, for gas.
  • temperature_data::Dict{String, Any}: Return value of the get_temperature function.
  • star_mass_data::Dict{String, Any}: Return value of the get_mass function, for stars.
  • age_data::Dict{String, Any}: Return value of the get_age function.
  • pos_data::Dict{String, Any}: Return value of the get_position function.
  • 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.
source
GADGETPlotting.mass_profile_plotMethod
mass_profile_plot(
    position_data::Dict{String, Any},
    mass_data::Dict{String, Any},
    time::Unitful.Quantity; 
    <keyword arguments>
)::Plots.Plot

Make an accumulated mass profile plot for a given time step.

Arguments

  • position_data::Dict{String, Any}: Return value of the get_position function.
  • mass_data::Dict{String, Any}: Return value of the get_mass function.
  • 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. if factor = 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.mass_profile_plotMethod
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.Plot

Make an accumulated mass profile plot of several datasets, for a given time step.

Arguments

  • position_data::Vector{Dict{String, Any}}: Return values of the get_position function.
  • mass_data::Vector{Dict{String, Any}}: Return values of the get_mass function.
  • 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. if factor = 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.metallicity_profile_plotMethod
metallicity_profile_plot(
    position_data::Dict{String, Any},
    mass_data::Dict{String, Any},
    z_data::Dict{String, Any},
    time::Unitful.Quantity; 
    <keyword arguments>
)::Plots.Plot

Make a metallicity profile plot for a given time step.

Arguments

  • position_data::Dict{String, Any}: Return value of the get_position function.
  • mass_data::Dict{String, Any}: Return value of the get_mass function.
  • z_data::Dict{String ,Any}: Return value of the get_metallicity function.
  • 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.metallicity_profile_plotMethod
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.Plot

Make a metallicity profile plot comparing several datasets, for a given time step.

Arguments

  • position_data::Vector{Dict{String, Any}}: Return values of the get_position function.
  • mass_data::Vector{Dict{String, Any}}: Return values of the get_mass function.
  • z_data::Vector{Dict{String, Any}}: Return values of the get_metallicity function.
  • 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 scale position_data["box_size"] if vacuum boundary conditions were used, and it will scale position_data["box_size"] / 2.0 if periodic boundary conditions were used.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.quantities_2D_plotMethod
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.Plot

Make 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 the quantities_2D function.
  • 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 in data. 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 the x_quantity, e.g. if x_factor = 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.
  • y_factor::Int64 = 0: Numerical exponent to scale the y_quantity, e.g. if y_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.
source
GADGETPlotting.redshift_series_plotMethod
redshift_series_plot(time_series::Dict{String,Any}; <keyword arguments>)::Plots.Plot

Make 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 the get_time_evolution function.
  • mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. if mass_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. if number_factor = 4, the corresponding axis will be scaled by $10^4$.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.rho_temp_plotMethod
rho_temp_plot(
    temperature_data::Dict{String, Any},
    density_data::Dict{String, Any},
    time::Unitful.Quantity,
)::Plots.Plot

Make 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 the get_temperature function.
  • density_data::Dict{String, Any}: Return value of the get_density function.
  • 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.
source
GADGETPlotting.scale_factor_series_plotMethod
scale_factor_series_plot(time_series::Dict{String,Any}; <keyword arguments>)::Plots.Plot

Make 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 the get_time_evolution function.
  • mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. if mass_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. if number_factor = 4, the corresponding axis will be scaled by $10^4$.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.scatter_grid_plotMethod
scatter_grid_plot(position_data::Dict{String, Any})::Plots.Plot

Make 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 the get_position function.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.sfr_txt_plotMethod
sfr_txt_plot(
    data::Dict{Union{Int64, String}, Any},
    x_axis::Int64,
    y_axis::Vector{Int64}; 
    <keyword arguments>
)::Plots.Plot

Make a plot of columns y_axis vs. column x_axis for the data in the sfr.txt file.

Warning

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 the get_sfr_txt function.
  • 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 is Inf, 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 the x_quantity, e.g. if x_factor = 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.
  • y_factor::Int64 = 0: Numerical exponent to scale the y_quantity, e.g. if y_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 than min_filter[1], then it is deleted. Equivalently with the y axis and min_filter[2]. The default is -Inf for both, i.e. no filtering.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.sfr_txt_plotMethod
sfr_txt_plot(
    data::Vector{Dict{Union{Int64, String}, Any}},
    x_axis::Int64,
    y_axis::Int64,
    labels::Array{String, 2}; 
    <keyword arguments>
)::Plots.Plot

Make a plot comparing column y_axis vs. column x_axis for the data in the sfr.txt file of several simulations.

Warning

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 the get_sfr_txt function.
  • 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 is Inf, 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 the x_quantity, e.g. if x_factor = 10 the corresponding axis will be scaled by $10^{10}$. The default is no scaling.
  • y_factor::Int64 = 0: Numerical exponent to scale the y_quantity, e.g. if y_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 than min_filter[1], then it is deleted. Equivalently with the y axis and min_filter[2]. The default is -Inf for both, i.e. no filtering.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.star_map_plotMethod
star_map_plot(position_data::Dict{String,Any}; <keyword arguments>)::Plots.Plot

Make 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 the get_position function.
  • 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 scale positions["box_size"] if vacuum boundary conditions were used, and it will scale positions["box_size"] / 2 if 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 if axes = 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_9 and :inferno, which is the default.

Returns

  • The plot generated by the GR backend of Plots.jl.
source
GADGETPlotting.temperature_histogram_plotMethod
temperature_histogram_plot(
    temperature_data::Dict{String, Any},
    time::Unitful.Quantity; 
    <keyword arguments>
)::Plots.Plot

Make a histogram of the logarithm of the gas particles' temperatures.

Arguments

  • temperature_data::Dict{String,Any}: Return value of the get_temperature function.
  • 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.
source
GADGETPlotting.time_series_plotMethod
time_series_plot(time_series::Dict{String, Any}; <keyword arguments>)::Plots.Plot

Make 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 the get_time_evolution function.
  • mass_factor::Int64 = 0: Numerical exponent to scale the mass, e.g. if mass_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. if number_factor = 4, the corresponding axis will be scaled by $10^4$.

Returns

  • The plot generated by the GR backend of Plots.jl.
source