Plotting Marker Swarms
EarthBox.PlotToolsManager.ModelPlots2DManager.plot_markers — Function
plot_markers(;
plot_type::Union{String, Symbol},
model_output_path::String,
material_library_file_path::String,
material_model_file_path::Union{String, Nothing}=nothing,
materials_input_dict::Union{Dict, Nothing}=nothing,
dimensions::Tuple{Float64, Float64, Float64, Float64},
xyspacing::Tuple{Float64, Float64},
istart::Int64 = 1,
iend::Union{Int64, Nothing} = nothing,
kwargs...
)::NothingArguments
plot_type::Union{String, Symbol}:- Type of marker plot to plot
model_output_path::String:- Path to output directory containing model output files
material_library_file_path::String:- Path to material collection library file with yaml format. See Material Collection Files for more information.
material_model_file_path::Union{String, Nothing}:- Path to material model input file with yaml format. See Material Input Files for more information.
materials_input_dict::Union{Dict, Nothing}:- Dictionary of material inputs where keys are material ID's and each key refers to a dictionary with keys for
mat_name,mat_type,mat_domain,red_fraction,green_fractionandblue_fraction. See Material Input Dictionaries for more information.
- Dictionary of material inputs where keys are material ID's and each key refers to a dictionary with keys for
dimensions::Tuple{Float64, Float64, Float64, Float64}:- Dimensions of plot: (xmin, xmax, ymin, ymax)
xyspacing::Tuple{Float64, Float64}:- Spacing of ticks for the x and y axes: (xspacing, yspacing)
istart::Int64 = 1:- Initial starting time step
iend::Union{Int64, Nothing} = nothing:- Final ending time step
Valid Plot Types
- Composition
- Marker composition is plotted using RBG values associated with each material
- CompositionHeatFlow
- Marker composition is plotted using RBG values associated with each material
- Surface heat flow is plotted above the composition plot.
- CompositionGravity
- Marker composition is plotted using RBG values associated with each material
- Surface gravity is plotted above the composition plot.
- CompositionHeatFlowGravity
- Marker composition is plotted using RBG values associated with each material
- Surface heat flow and gravity are plotted above the composition plot.
- PlasticFailure
- Marker plastic failure is plotted using a color map associated with the plastic failure criterion.
- Density
- Marker density is plotted using a color map associated with the density.
Optional Marker Plot Keyword Arguments
General Marker Plot Parameters
marker_size::Float64: Size of the markers (default: 1.0)plot_contour_labels::Bool: Plot contour labels (default: false)contour_line_width::Float64: Width of the contour lines (default: 0.5)contour_line_color::{String, Symbol}: Contour line color (default: "black")decimation_factor_scatter_overlay::Int: Decimation factor for scatter overlays (default: 1)nx_contour_grid::Int: Number of interpolation grid points in x-direction (default: 50)ny_contour_grid::Int: Number of interpolation grid points in y-direction (default: 50)colorbar_shift_factor::Float64: Shift factor for color bar (default: 0.0)decimation_factor::Int: Decimation factor for scatter plots (default: 1)
Base Level Plot Parameters
plot_base_level::Bool: Whether to plot the base level (default: false)base_level_line_width::Float64: Width of the base level lines (default: 0.5)base_level_line_color::{String, Symbol}: Color of the base level lines (default: "blue")
Topography Plot Parameters
plot_topography::Bool: Whether to plot topography (default: false)topo_line_width::Float64: Width of the topography lines (default: 0.5)topo_line_color::{String, Symbol}: Color of the topography lines (default: "black")
Plastic Strain Plot Parameters
plot_plastic_strain::Bool: Plot marker plastic strain (default: false)strain_min::Float64: Minimum strain value (default: 1.0)strain_max::Float64: Maximum strain value (default: 6.0)strain_contour_interval::Float64: Interval for strain contours (default: 0.25)strain_cmap::{String, Symbol}: Colormap for strain plot (default: "inferno")
Plastic Strain Rate Plot Parameters
plot_plastic_strain_rate::Bool: Plot marker plastic strain rate (default: false)strain_rate_min::Float64: Minimum strain rate value in log10(1/s) (default: -18)strain_rate_max::Float64: Maximum strain rate value in log10(1/s) (default: -12)strain_rate_contour_interval::Float64: Interval for strain rate contours in log10(1/s) (default: 1.0)strain_rate_cmap::{String, Symbol}: Colormap for strain rate plot (default: "Reds")
Sediment Age Plot Parameters
plot_sediment_age::Bool: Plot marker sediment age (default: false)age_min::Float64: Minimum age in Myr value (default: 0.0)age_max::Float64: Maximum age in Myr value (default: 10.0)age_contour_interval::Float64: Interval for age contours in Myr (default: 1.0)age_cmap::{String, Symbol}: Colormap for age plot (default: "rainbow")
Volcanics Age Plot Parameters
plot_volcanics_age::Bool: Plot marker volcanics age (default: false)age_min_volcanics::Float64: Minimum volcanics age in Myr value (default: 0.0)age_max_volcanics::Float64: Maximum volcanics age in Myr value (default: 10.0)age_contour_interval_volcanics::Float64: Interval for volcanics age contours in Myr (default: 1.0)
Intrusive Age Plot Parameters
plot_intrusive_age::Bool: Plot marker intrusive age (default: false)age_min_intrusive::Float64: Minimum intrusive age in Myr value (default: 0.0)age_max_intrusive::Float64: Maximum intrusive age in Myr value (default: 10.0)age_contour_interval_intrusive::Float64: Interval for intrusive age contours in Myr (default: 1.0)
Melt Fraction Plot Parameters (only for mantle melting)
plot_meltfrac::Bool: Plot marker melt fraction (default: false)plot_meltfrac_contours::Bool: Plot melt fraction contours (default: false)
Extracted Melt Fraction Plot Parameters (only for mantle melting)
plot_extracted_meltfrac::Bool: Plot marker extracted melt fraction (default: false)plot_extracted_meltfrac_contours::Bool: Plot extracted melt fraction contours (default: false)
Extractable Melt Fraction Plot Parameters (only for mantle melting)
plot_extractable_meltfrac::Bool: Plot marker extractable melt fraction (default: false)plot_extractable_meltfrac_contours::Bool: Plot extractable melt fraction contours (default: false)
Parameters for All Melt-fraction Plots (only for mantle melting)
melt_fraction_min::Float64: Minimum melt fraction value (default: 0.0)melt_fraction_max::Float64: Maximum melt fraction value (default: 1.0)melt_fraction_contour_interval::Float64: Interval for melt fraction contours (default: 0.1)meltfrac_cmap::{String, Symbol}: Colormap for melt fraction plot (default: "inferno")meltfrac_contour_color::{String, Symbol}: Contour color for melt fraction plot (default: "red")meltfrac_number_format::String: Number format for melt fraction contours (default: "%6.2f")
Serpentinization Plot Parameters
plot_serpentinization::Bool: Plot marker serpentinization (default: false)serpentinization_min::Float64: Minimum serpentinization fraction value (default: 0.0)serpentinization_max::Float64: Maximum serpentinization fraction value (default: 1.0)serpentinization_contour_interval::Float64: Interval for serpentinization fraction contours (default: 0.1)serpentinization_cmap::{String, Symbol}: Colormap for serpentinization plot (default: "inferno")
Density Plot Parameters
plot_density::Bool: Plot marker density (default: false)density_min::Float64: Minimum density value in kg/m^3 (default: 0.0)density_max::Float64: Maximum density value in kg/m^3 (default: 3000.0)density_contour_interval::Float64: Interval for density contours in kg/m^3 (default: 100.0)
Grid Temperature Contour Plot Parameters
plot_temperature_contours::Bool: Whether to plot temperature contours (default: false)temperature_min::Float64: Minimum temperature value in Celsius (default: 0.0)temperature_max::Float64: Maximum temperature value in Celsius (default: 1300.0)temperature_contour_interval::Float64: Interval for temperature contours in Celsius (default: 100.0)temperature_contour_color::{String, Symbol}: Contour color for temperature plot (default: "black")temperature_number_format::String: Number format for temperature contours (default: "%6.1f")
Heat flow and gravity subplot parameters
heatflow_min::Float64: Minimum heat flow value in mW/m^2 (default: 0.0)heatflow_max::Float64: Maximum heat flow value in mW/m^2 (default: 200.0)heatflow_spacing::Float64: Spacing between heat flow ticks on y-axis in mW/m^2 (default: 50.0)gravity_min::Float64: Minimum gravity value in mgal (default: -200.0)gravity_max::Float64: Maximum gravity value in mgal (default: 200.0)gravity_spacing::Float64: Spacing between gravity ticks on y-axis in mgal (default: 50.0)height_ratios::Vector{Float64}: Relative height ratios for subplots (default: [0.25, 0.25, 0.75])
Optional General Plotting Keyword Arguments
nsteps::Int:- Number of time steps to plot
nskip::Int:- Number of time steps to skip
istart::Int:- Initial starting time step
iplot_contour_labels::Int:- 0 = off; 1 = plot contour labels
color_map::Union{String, Symbol}:- color map name for scalar grid plots (see https://docs.makie.org/dev/explanations/colors)
figure_dpi::Float64:- Dots per square inch for figures
figsize::Tuple{Float64, Float64}:- Figure size in inches in x-y directions
length_units::String:- Length units for plots ("km", "m", "cm")
time_units::String:- Time units for plots ("Myr", "yr", "s")
velocity_units::String:- Velocity units for plots ("cm/yr", "cm/hr", "m/s", "m/yr", "mm/yr")
temperature_units::String:- Temperature units for plots ("C", "K")
viscosity_units::String:- Viscosity units for plots ("Pa.s", "log10(Pa.s)")
strainrate_units::String:- Strain rate units for plots ("1/s", "log10(1/s)")
pressure_units::String:- Pressure units for plots ("Pa", "GPa", "MPa")
stress_units::String:- Stress units for plots ("Pa", "GPa", "MPa")
linewidth::Float64:- Line width for plots
edgecolor::String:- Edge color for plots
show_nodes::Bool:- Show nodes on plots
dimensions::Tuple{Float64, Float64, Float64, Float64}:- Dimensions of plot: (xmin, xmax, ymin, ymax)
dim_close_up::Union{Tuple{Float64, Float64, Float64, Float64}, Nothing}:- Dimensions of zoomed in plot: (xmin, xmax, ymin, ymax)
xyspacing::Tuple{Float64, Float64}:- Spacing of ticks for the x and y axes: (xspacing, yspacing)
xy_location_contour_legend::Tuple{Float64, Float64}:- Location of low-left-hand corner of contour legend
title_fontsize::Int:- Font size for title
axis_title_fontsize::Int:- Font size for axis titles
axis_labels_fontsize::Int:- Font size for axis labels
axis_ticks_fontsize::Int:- Font size for axis ticks
contour_label_fontsize::Int:- Font size for contour labels
number_format::String:- Number format for contours (e.g. "%6.1f")
legend_fontsize::Int:- Font size for legend
colorbar_ticks_fontsize::Int:- Font size for color bar ticks
colorbar_labels_fontsize::Int:- Font size for color bar labels
text_box_font_size::Int:- Font size for text box
extension::String:- Extension for plots (e.g. ".png", ".pdf")