Plotting
Overview Structs
GEMS.ActiveDarkFigureGEMS.AggregatedSettingAgeContactsGEMS.CompartmentFillGEMS.CumulativeCasesGEMS.CumulativeDiseaseProgressionsGEMS.CumulativeIsolationsGEMS.CustomLoggerPlotGEMS.DetectedCasesGEMS.EffectiveReproductionGEMS.GenerationTimeGEMS.HospitalOccupancyGEMS.HouseholdAttackRateGEMS.IncidenceGEMS.IncubationHistogramGEMS.InfectionDurationGEMS.InfectiousHistogramGEMS.LatencyHistogramGEMS.ObservedReproductionGEMS.ObservedSerialIntervalGEMS.PopulationPyramidGEMS.ProgressionCategoriesGEMS.SettingAgeContactsGEMS.SettingSizeDistributionGEMS.SimulationPlotGEMS.TestPositiveRateGEMS.TickCasesGEMS.TickCasesBySettingGEMS.TickTestsGEMS.TimeToDetectionGEMS.TotalTests
Overview Functions
GEMS.gemsheatmapGEMS.gemsplotGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.generateGEMS.saveplot
Plotting
GEMS.gemsplot — Function
gemsplot(rd::ResultData; type::Symbol = :nothing, plotargs...)
gemsplot(bd::BatchData; type::Symbol = :nothing, combined::Symbol = :all, plotargs...)
gemsplot(rd::Vector{ResultData}; type::Symbol = :nothing, combined::Symbol = :all, plotargs...)Facilitates the usage of GEMS' inbuilt plots. Just pass the name of the plot-type as a Symbol (must be exactly the same as the respective SimulationPlot-struct). The plotargs... can be any keyworded argument that is available in the standard Plots.jl package.
You can pass a ResultData object to get a plot for one simulation run or even pass a vector of ResultData objects or even a BatchData object. Passing data of multiple simulation runs (ResultData-vector or BatchData) will generate the respective plot with the data of all simulation runs inside. E.g., the :TickCases plot will show one line for each run. Simulations with the same label attribute will be grouped using the same color.
The keyword combined (only applicable for ResultData-vectors or BatchData-objects) determines whether all data is combined in a single plot (:all), each simulation run gets its own subplot (:single), or the plots are separated by group (:bygroup). Note: There might be plots without a multi-plot implementation. They will always be printed as if combined = :single was passed. Check the table below to see which plots are available for single- and multiplots.
Parameters
rd/bd: Data object to plot. Can beResultData,Vector{ResultData}orBatchDatatype = :nothing(optional): Plot type (instantiates a plot with the exact same struct name). You can pass a tuple of plots to generate one graph with multiple visualizationscombined::Symbol = :all(optional): all data in one plot (:all), all individual plots (:singe), plot separated by group (:bygroup).plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Plot using thePlots.jlpackage's struct.
Examples
Given that rd is a valid ResultData object that came out of a simulation, you can plot a summary like this:
gemsplot(rd)If you want a specific plot, say the cases-per-tick plot, try this and add a custom title:
gemsplot(rd, type = :TickCases, title = "My Tick Case Plot")You can also generate multiple plots in one figure like so:
gemsplot(rd, type = (:CompartmentFill, :EffectiveReproduction), layout = (2,1))The layout keyword makes the plots appear on top of each other in stead of side-by-side.
Generate a multi-plot for a vector of ResultData objects and separate plots by label like so:
# assuming you have a baseline, and a lockdown scenario with two simulation runs each.
# the simulations of these ResultData objects must have the same label ("Baseline" and "Lockdown") to group them
rds = [rd_baseline_1, rd_baseline_2, rd_lockdown_1, rd_lockdown_2]
gemsplot(rds, type = :EffectiveReproduction, combined = :bygroup)Plot Types
The following plot types can be generated using the gemsplot() function. The mutli-plot column describes which plots can work with ResultData-vector or BatchData-objects. Some of the plots have keyword arguments that are only applicable to that very plot.
| Type | Description | Multi-Plot | Plot-Specific Parameters |
|---|---|---|---|
:ActiveDarkFigure | Fraction of current infections per tick that are "known"/detected at that tick. | Yes | |
:AggregatedSettingAgeContacts | Age-X-Age contact matrix for all setting types in the simulation (e.g., Household). | No | settingtype::DataType: Filter for specific setting type (e.g., Household), show_values::Bool: Enable or disable printed values in cells. |
:CompartmentFill | Current number of individuals per compartment (classic SEIR curves). | No | |
:CumulativeCases | Summed-up cases over time. | Yes | |
:CumulativeDiseaseProgressions | Number of people in a certain disease state at a given tick after their exposure. | No | |
:CumulativeIsolations | Number of currently isolated individuals over time. | Yes | series::Symbol: Filter for :workers, :students, :other, or :all |
:CustomLoggerPlot | CustomLogger values. One subplot per logging function in the multi-plot variant. | Yes | |
:DetectedCases | New detected cases per time step. | No | |
:EffectiveReproduction | Effective reproduction number (R_eff) over time. | Yes | |
:GenerationTime | Mean generation time over time. | Yes | |
:HospitalOccupancy | Number of hospitalized, ventilated, and ICU-admitted indivudual over time. | No | |
:HouseholdAttackRate | In-Household attack rate per household size. | Yes | ar_only::Bool: Iftrue`, only the attack rate plot will be returned. |
:Incidence | Indicende over time by 10-year age group (stacked chart). | No | |
:IncubationHistogram | Histogram of incubation period duratons. | No | |
:InfectionDuration | Histogram of total infection durations. | Yes | |
:InfectiousHistogram | Histogram of infectious period duratons. | No | |
:LatencyHistogram | Histogram of latency period durations. | No | |
:ObservedReproduction | Observed rffective reproduction number (R_eff) over time (based on detected cases). | No | |
:ObservedSerialInterval | Observed serial interval (SI) over time (based on detected cases). | No | |
:PopulationPyramid | Population Pyramid by age and sex. | No | |
:SettingSizeDistribution | Histograms of setting sizes for all setting types (e.g., Households) | No | |
:ProgressionCategories | Heatmap of the fraction of progression categories (asymptomatic, mild, ...) by age. | No | |
:TestPositiveRate | Fraction of all performed tests that were positive per test type (e.g., PCR). | No | |
:TickCases | New cases per time step. For single sim. also with new infectious, removed, dead. | Yes | series::Union{Symbol, Vector{Symbol}}: Select one or multiple series (exposed, infectious, removed, deaths) to plot (not for mulitplots). |
:TickCasesBySetting | New cases stratified by setting type (e.g., Household or Office) | No | |
:TickSeroTests | Number of seroprevalence tests and their results per tick. | No | detailed::Bool = false: Whether to show detailed breakdown (TP, FP, TN, FN). |
:TickTests | Performed tests per time step, including positive and total tests and reported cases. | No | |
:TimeToDetection | Average time between exposure and detected for all infections over time. | No | |
:TotalTests | Total number of performed tests per test type (e.g., PCR) | Yes |
Some Useful Keyword Arguments
Here are some examples of the Plots.jl package's keyword arguments that you can also pass to the gemsplot() function and might find helpful:
xlims = (0, 100): Setting the X-axis range between 0 and 100ylims = (0, 200): Setting the Y-axis range between 0 and 200size = (300, 400): Resizing the plotplot_title = "My New Title": Changing the plot titlexlabel = "New X-label": Changing the x-axis labelylabel = "New Y-label": Changing the y-axis labellegend = :topright: Changing the legend position (falseto disable)aspect_ratio = :equal: Having the axis of equal size
Please consult the Plots.jl package documentation for a comprehensive list
GEMS.gemsheatmap — Function
gemsheatmap(xvals::Vector{<:Any}, yvals::Vector{<:Any}, outvals::Vector{<:Any};
aggregate::Function = mean,
xrev::Bool = false,
yrev::Bool = false,
xformatter::Function = x -> x,
yformatter::Function = y -> y,
color = :inferno,
plotargs...)Generates a heatmap of the value combinations in xvals and yvals colored according to values in outvals. This function can be used to visualize the results of sweeps through parameter spaces.
Parameters
xvals::Vector{<:Any}: X-axis values for heatmapyvals::Vector{<:Any}: Y-axis values for heatmapoutvals::Vector{<:Any}: outome / colored values for heatmapaggregate::Function = mean(optional): If multiple outcome values are available per X/Y-combination, this function is applied to aggregate results (e.g.,mean,minimum,maximum,first, ...)xrev::Bool = false(optional): If true, reverses order of ticks on x-axisyrev::Bool = false(optional): If true, reverses order of ticks on y-axisxformatter::Function = x -> x(optional): One-argument function to format x-axis ticksyformatter::Function = y -> y(optional): One-argument function to format y-axis tickscolor = :inferno(optional): Any color (-scheme) that is available to thePlots.jlpackage takes. If:r0it will apply a color scheme for R0-Maps (with singled-outR=1)plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Plot using thePlots.jlpackage's struct.
Example
xvals = []
yvals = []
outvals = []
# vary transmission rate
for tr in 0.1:0.02:0.3
# vary time to recovery
for rec in 3:13
sim = Simulation(transmission_rate = tr, time_to_recovery = rec)
run!(sim)
rd = ResultData(sim, style = "LightRD")
# extract data for heatmap
push!(xvals, tr)
push!(yvals, rec)
push!(outvals, r0(rd))
end
end
# print heatmap
gemsheatmap(xvals, yvals, outvals,
xlabel = "Transmission Rate",
ylabel = "Time to Recovery",
colorbar_title = "Basic Reproduction Number",
color = :r0) Missing docstring for emptyplot(::String). Check Documenter's build log for details.
GEMS.saveplot — Function
saveplot(plot::Plots.Plot, path::AbstractString)Stores a plot from the juliaplots package to the provided path.
saveplot(plot::GMTWrapper, path::AbstractString)Copies a GMT plot from the temp folder into the provided path (removes the temporary file).
Plot Types
GEMS.ActiveDarkFigure — Type
ActiveDarkFigure <: SimulationPlotA simulation plot type for generating an active-darkfigure-per-tick plot.
GEMS.generate — Method
generate(plt::ActiveDarkFigure, rd::ResultData; plotargs...)Generates and returns a active-darkfigure-per-tick plot for a provided ResultData object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::ActiveDarkFigure:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Active Dark Figure plot
GEMS.AggregatedSettingAgeContacts — Type
AggregatedSettingAgeContacts <: SimulationPlotA simulation plot type for sampling contacts from the model and build an age group x age group matrix for a given Setting type. The plot displays aggregated age groups and their mean number of contacts.
GEMS.generate — Method
generate(plt::AggregatedSettingAgeContacts, rd::ResultData;
settingtype::Union{DataType, Nothing} = nothing, plotargs...)Generates and returns an age group x age group matrix from sampled contacts for a given Setting type. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::AggregatedSettingAgeContacts:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotsettingtype::Union{DataType, Nothing} = nothing(optional): Setting type (e.g. "Household"). If nothing is passed, all setting types in theResultDataobject are being ploted.show_values = true(optional): If true, values will be printed in the contact matrixplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Aggregated Setting Age Contacts plot
GEMS.CompartmentFill — Type
CompartmentFill <: SimulationPlotA simulation plot type for generating a cumulative infections plot.
GEMS.generate — Method
generate(plt::CompartmentFill, rd::ResultData; plotargs...)Generates and returns a plot of the current compartment fill for a provided ResultData object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::CompartmentFill:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Compartment Fill plot
GEMS.CumulativeCases — Type
CumulativeCases <: SimulationPlotA simulation plot type for generating a cumulative infections plot.
GEMS.generate — Method
generate(plt::CumulativeCases, rd::ResultData; plotargs...)Generates and returns a cumulative infections plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::CumulativeCases:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Cumulative Cases plot
GEMS.CumulativeDiseaseProgressions — Type
CumulativeDiseaseProgressions <: SimulationPlotA simulation plot type for generating a stacked bar chart on the cumulative disease progression.
GEMS.generate — Method
generate(plt::CumulativeDiseaseProgressions, rd::ResultData; plotargs...)Generates a stacked bar chart of cumulative disease progressions for all infections. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::CumulativeDiseaseProgressions:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Cumulative Disease Progressions plot
GEMS.CumulativeIsolations — Type
CumulativeIsolations <: SimulationPlotA simulation plot type for generating a plot displaying the cumulative number of individuals currently in isolation.
GEMS.generate — Method
generate(plt::CumulativeIsolations, rd::ResultData; plotargs...)Generates a plot for the cumulative number of isolated individuals per tick. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::CumulativeIsolations:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Cumulative Isolations plot
GEMS.CustomLoggerPlot — Type
CustomLoggerPlot <: SimulationPlotA simulation plot type for generating a time series plot displaying values stored in a ResultDatas CustomLogger dataframe.
GEMS.generate — Method
generate(plt::CustomLoggerPlot, rd::ResultData; plotargs...)Generates and returns a plot for the values contained in the custom logger of a ResultData object. It will contain one individual plot per function that was passed to the custom logger. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package. However, be aware that the keyword arguments might be applied to each of the subplots individually.
Parameters
plt::CustomLoggerPlot:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Custom Logger Plot plot
GEMS.DetectedCases — Type
DetectedCases <: SimulationPlotA simulation plot type for generating a new-DETECTED-cases-per-tick plot.
GEMS.generate — Method
generate(plt::DetectedCases, rd::ResultData; plotargs...)Generates and returns a new-DETECTED-cases-per-tick plot for a provided simulation object. Sorts infections dataframe by tick and filters for tested individuals. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::DetectedCases:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Detected Cases plot
GEMS.EffectiveReproduction — Type
EffectiveReproduction <: SimulationPlotA simulation plot type for generating an effective reproduction number plot.
GEMS.generate — Method
generate(plt::EffectiveReproduction, rd::ResultData; plotargs...)Generates a plot for the effective reproduction number per tick. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::EffectiveReproduction:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Effective Reproduction Number plot
GEMS.GenerationTime — Type
GenerationTime <: SimulationPlotA simulation plot type for generating a generation-time-per-tick.
GEMS.generate — Method
generate(plt::GenerationTime, rd::ResultData; plotargs...)Generates and returns a generation-time-per-tick plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::GenerationTime:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Generation Time plot
GEMS.HospitalOccupancy — Type
HospitalOccupancy <: SimulationPlotA simulation plot type for generating a plot with hospitalization numbers etc.
GEMS.generate — Method
generate(plt::HospitalOccupancy, rd::ResultData; plotargs...)Generates a plot of the number of hospitalized, ventilated and ICU admitted agents for each tick. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::HospitalOccupancy:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Hospital Occupancy plot
GEMS.HouseholdAttackRate — Type
HouseholdAttackRate <: SimulationPlotA simulation plot type for generating a household-attack-rate plot.
GEMS.generate — Method
generate(plt::HouseholdAttackRate, rd::ResultData; plotargs...)Generates and returns a household-attack-rate plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package. However, be aware that the keyword arguments might be applied to each of the subplots individually.
Parameters
plt::HouseholdAttackRate:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotar_only::Bool = false(optional): Iftrue, only the attack rate plot will be returned, otherwise a multi-plot with attack rate and household size over time.pathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Household Attack Rate plot
GEMS.Incidence — Type
Incidence <: SimulationPlotA simulation plot type for generating an incidence plot.
GEMS.generate — Method
generate(plt::Incidence, rd::ResultData; plotargs...)Generates an age-stratified incidence plot. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::Incidence:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Incidence plot
GEMS.IncubationHistogram — Type
IncubationHistogram <: SimulationPlotA simulation plot type for generating the distribution of incubation period lengths for symptomatic individuals.
GEMS.generate — Method
generate(plt::IncubationHistogram, rd::ResultData; plotargs...)Generates a histogram of the incubation period distribution (time to symptoms) of collected infections. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Note that this only shows the incubation period for symptomatic individuals!
Parameters
plt::IncubationHistogram:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Incubation Histogram plot
GEMS.InfectionDuration — Type
InfectionDuration <: SimulationPlotA simulation plot type for visualizing the distribution of infection durations as a histogram.
GEMS.generate — Method
generate(plt::InfectionDuration, rd::ResultData; plotargs...)Generates and returns a histogram of the total infection durations in ticks. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::InfectionDuration:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Infection Duration plot
GEMS.InfectiousHistogram — Type
InfectiousHistogram <: SimulationPlotA simulation plot type for generating the distribution of infectious period lengths.
GEMS.generate — Method
generate(plt::InfectiousHistogram, rd::ResultData; plotargs...)Generates a histogram of the infectious period distribution of collected infections. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::InfectiousHistogram:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Infectious Histogram plot
GEMS.LatencyHistogram — Type
LatencyHistogram <: SimulationPlotA simulation plot type for generating the distribution of latency period lengths.
GEMS.generate — Method
generate(plt::LatencyHistogram, rd::ResultData; plotargs...)Generates a histogram of the latency period distribution of collected infections. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::LatencyHistogram:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Latency Histogram plot
GEMS.ObservedReproduction — Type
ObservedReproduction <: SimulationPlotA simulation plot type for generating a observed-reproduction-number-plot.
GEMS.generate — Method
generate(plt::ObservedReproduction, rd::ResultData; plotargs...)Generates a plot for the effective reproduction number per tick. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::ObservedReproduction:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Observed Reproduction Number plot
GEMS.ObservedSerialInterval — Type
ObservedSerialInterval <: SimulationPlotA simulation plot type for generating a observed-serial-interval-plot.
GEMS.generate — Method
generate(plt::ObservedSerialInterval, rd::ResultData; plotargs...)Generates a plot for the estimation on the observed serial interval per tick. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::ObservedSerialInterval:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Observed Serial Interval plot
GEMS.PopulationPyramid — Type
PopulationPyramid <: SimulationPlotA simulation plot type for generating a population pyramid for the associated population model.
GEMS.generate — Method
generate(plt::PopulationPyramid, rd::ResultData; plotargs...)Generates population pyramid for a the associated population model.
The current implementation does not offer the option for additional keyworded arguments. The plotargs... argument is just a placeholder.
Parameters
plt::PopulationPyramid:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): PLACEHOLDER. Currently not implemented.
Returns
Plots.Plot: Population Pyramid plot
GEMS.SettingAgeContacts — Type
SettingAgeContacts <: SimulationPlotA simulation plot type for sampling contacts from the model and build an age x age matrix for a given Setting type.
GEMS.generate — Method
generate(plt::SettingAgeContacts, rd::ResultData; plotargs...)Generates and returns an age x age matrix from sampled contacts for a given Setting type. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::SettingAgeContacts:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Setting Age Contacts plot
GEMS.SettingSizeDistribution — Type
SettingSizeDistribution <: SimulationPlotA simulation plot type for generating a population pyramid for the associated population model.
GEMS.generate — Method
generate(plt::SettingSizeDistribution, rd::ResultData; plotargs...)Generates the setting size distributions for all included settings. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::SettingSizeDistribution:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Setting Size Distribution plot
GEMS.SimulationPlot — Type
Supertype for all plots that go into single-run simulation reports
GEMS.generate — Method
Abstract wrapper function for all simulation report plots. Requires concrete implementation in subtypes
GEMS.ProgressionCategories — Type
ProgressionCategories <: SimulationPlotA simulation plot type for visualizing the progression categories of infections by age.
GEMS.generate — Method
generate(plt::ProgressionCategories, rd::ResultData; plotargs...)Generates and returns a progression_category x age matrix as heatmap. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::ProgressionCategories:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Progression Categories plot
GEMS.TestPositiveRate — Type
TestPositiveRate <: SimulationPlotA simulation plot type for generating a tests-positive-rate-per-tick plot.
GEMS.generate — Method
generate(plt::TestPositiveRate, rd::ResultData; plotargs...)Generates and returns a tests-positive-rate-per-tick plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TestPositiveRate:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Test Positive Rate plot
GEMS.TickCases — Type
TickCases <: SimulationPlotA simulation plot type for generating a new-cases-per-tick plot.
GEMS.generate — Method
generate(plt::TickCases, rd::ResultData; plotargs...)Generates and returns a new-cases-per-tick plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TickCases:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotseries::Union{Symbol, Vector{Symbol}} = [:exposed, :infectious, :removed, :deaths](optional): Select one or multiple series (exposed, infectious, removed, deaths) to plot (not for multiplots).pathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Tick Cases plot
GEMS.TickCasesBySetting — Type
TickCasesBySetting <: SimulationPlotA simulation plot type for generating tick cases for each included setting type.
GEMS.generate — Method
generate(plt::TickCasesBySetting, rd::ResultData; plotargs...)Generates a plot of tick cases for each included setting type. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TickCasesBySetting:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens as subplots.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Tick Cases By Setting plot
GEMS.TickTests — Type
TickTests <: SimulationPlotA simulation plot type for generating a new-tests-per-tick plot.
GEMS.generate — Method
generate(plt::TickTests, rd::ResultData; plotargs...)Generates and returns a tests-per-tick plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TickTests:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Tick Tests plot
GEMS.TimeToDetection — Type
TimeToDetection <: SimulationPlotA simulation plot type for generating a time-to-detection plot.
GEMS.generate — Method
generate(plt::TimeToDetection, rd::ResultData; plotargs...)Generates and returns a time-to-detection plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TimeToDetection:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotpathogen::Union{Nothing, Int8, Integer, AbstractString} = nothing(optional): Filter to a single pathogen by id or name. Default shows all pathogens.plotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Time To Detection plot
GEMS.TotalTests — Type
TotalTests <: SimulationPlotA simulation plot type for generating a total-tests-per-tick plot.
GEMS.generate — Method
generate(plt::TotalTests, rd::ResultData; plotargs...)Generates and returns a total-tests-per-tick plot for a provided simulation object. You can pass any additional keyword arguments using plotargs... that are available in the Plots.jl package.
Parameters
plt::TotalTests:SimulationPlotstruct with meta data (i.e. title, description, and filename)rd::ResultData: Input data used to generate plotplotargs...(optional): Any argument that theplot()function of thePlots.jlpackage can take.
Returns
Plots.Plot: Total Tests plot