dbHistogram

fun ReportBuilder.dbHistogram(responseName: String, binRows: List<HistogramTableData>, caption: String? = null, showPlot: Boolean = true)(source)

Appends a single histogram sub-section for one response from the database.

Produces (inside a section titled responseName):

  1. A data table ("Bin Frequencies") with columns: Bin | Label | Lower | Upper | Count | Cum Count | % | Cum %

  2. A histogram bar-chart plot (when showPlot is true)

Note: unlike the live-simulation histogram extension, no across-replication statistics property sheet is included because the histogram bins are stored aggregated across replications (one histogram per simulation run) rather than as raw observations.

Parameters

responseName

the response name used as the section title

binRows

the HistogramTableData rows for this response; must be non-empty

caption

optional section title override; defaults to responseName

showPlot

when true (default) a bar-chart plot is appended


fun ReportBuilder.dbHistogram(db: KSLDatabase, expName: String, responseName: String, showPlot: Boolean = true)(source)

Appends a single histogram section for one in-simulation ksl.modeling.variable.HistogramResponse, fetched from the database by name.

Convenience overload of the row-taking dbHistogram: it fetches the HISTOGRAM rows for responseName in expName via KSLDatabase.histogramDataFor and delegates. When the experiment has no histogram data for that response, a notice section is emitted instead of throwing.

Parameters

db

the database to query

expName

the experiment whose histogram data is used

responseName

the histogram response name (the response_name column)

showPlot

when true (default) a histogram bar-chart plot is appended