NCAUtilities
Docstrings
NCAUtilities.dose_vs_dose_normalized
— Functiondose_vs_dose_normalized(doselinearitypowermodel)
dose_vs_dose_normalized(figpos, doselinearitypowermodel)
Keywords
paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
markersize
strokecolor
bandcolor
strokewidth
NCAUtilities.groups_check
— Functiongroups_check(population | report)
groups_check(figpos, population | report)
Keywords
group
: Select which group from stratified input data to plot.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
markersize
NCAUtilities.jointitle
— Functionjointitle(v::AbstractVector, title_wrap_n::Union{Int,Nothing} = nothing)
Joins a list of title elements together with ", ". If title_wrap_n
is an Int
, the join delimiter between two elements will be ",\n" whenever the line would exceed the wrap character limit if joined by ", ".
NCAUtilities.parameters_dist
— Functionparameters_dist(report)
parameters_dist(figpos, report)
Keywords
parameter
: The name of the parameter to plot given as aSymbol
.group
: Select which group from stratified input data to plot.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
strokecolor
strokewidth
NCAUtilities.parameters_vs_group
— Functionparameters_vs_group(report)
parameters_vs_group(figpos, report)
Keywords
group
: Select which group from stratified input data to plot.parameter
: The name of the parameter to plot given as aSymbol
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
markersize
NCAUtilities.power_model
— Functionpower_model(doselinearitypowermodel)
power_model(figpos, doselinearitypowermodel)
Keywords
paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
markersize
markercolor
strokewidth
geomean_markersize
geomean_marker
geomean_strokecolor
geomean_strokewidth
geomean_markercolor
geomean_linestyle
geomean_color
band_color
NCAUtilities.removed_points_table
— Functionremoved_points_table(subject | population | report)
Summarize all points that have been removed from a subject
, population
, or report
by use of NCA.filter_conc
.
Keywords
digits::Integer
controls the rounding of values in thetime
andconcentration
columns.escape
is a function that controls how strings are escaped, defaults to LaTeX escaping.
NCAUtilities.short_string
— Methodshort_string(number; target_digits)
Attempts to convert a floating point number into a short string with a target number of significant digits. For example, with 3 target digits, desirable numbers would be 123, 12.3, 1.23, 0.123, 0.0123 etc. Numbers larger than the number of digits are only rounded to the next integer and printed without trailing .0 (compare with round(1234, sigdigits = 3)
which prints as 1230.0
). Numbers are printed with Julia's normal exponent style when the floored base 10 exponent is -5 and lower or 6 and higher.
short_string( 1234567, target_digits = 4) = "1.235e6"
short_string( 123456.7, target_digits = 4) = "123457"
short_string( 12345.67, target_digits = 4) = "12346"
short_string( 1234.567, target_digits = 4) = "1235"
short_string( 123.4567, target_digits = 4) = "123.5"
short_string( 12.34567, target_digits = 4) = "12.35"
short_string( 1.234567, target_digits = 4) = "1.235"
short_string( 0.1234567, target_digits = 4) = "0.1235"
short_string( 0.01234567, target_digits = 4) = "0.01235"
short_string( 0.001234567, target_digits = 4) = "0.001235"
short_string( 0.0001234567, target_digits = 4) = "0.0001235"
short_string( 0.00001234567, target_digits = 4) = "1.235e-5"
short_string( 0.000001234567, target_digits = 4) = "1.235e-6"
short_string(0.0000001234567, target_digits = 4) = "1.235e-7"
NCAUtilities.summary_observations_vs_time
— Functionsummary_observations_vs_time(population | report)
summary_observations_vs_time(figpos, population | report)
Keywords
statistic
: Select whether to use:mean
or:geomean
for the statistic.errorbars
: Set tofalse
to hide error bars.separate
: Set tofalse
to overlay all groups on a single axis.show_subjects
: Set totrue
to overlay individual traces ("spaghetti plots")group
: Select which group from stratified input data to plot.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
color
: Either any scalar color that Makie can handle, or ifseparate = false
and the population is grouped, a vector of colors (for example usingMakie.categorical_colors
or manually specified) or aPlotUtils.CategoricalColorGradient
(whatMakie.cgrad(colormap, n, categorical = true)
returns) with at least as many colors as there are groups. In this case, the groups 1 to n will get the colors 1 to n from these objects. Unused colors are ignored.linewidth
linestyle
marker
markercolor
markersize
errorbar_color
errorbar_linewidth
errorbar_linestyle
whiskerwidth
subjects_color
: Either any scalar color that Makie can handle or a number between 0 and 1 which takes the main color and applies the number as an alpha value to it.subjects_linewidth
subjects_linestyle
PlottingUtilities.observations_vs_time
— Functionobservations_vs_time(subject | population | report)
observations_vs_time(figpos, subject | population | report)
Keywords
ids
: Select which subject IDs to display. Can be either a single ID or aVector
of IDs. Note that the type of the ID must match those in the population, i.e. a value1
is not the same as a"1"
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:observed
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
- `color`
- `linestyle`
- `linewidth`
- `markercolor`
- `markersize`
- `group_fontsize`
PlottingUtilities.subject_fits
— Functionsubject_fits(subject | population | report)
subject_fits(figpos, subject | population | report)
Keywords
ids
: Select which subject IDs to display. Can be either a single ID or aVector
of IDs. Note that the type of the ID must match those in the population, i.e. a value1
is not the same as a"1"
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:observed
,cpred
, andremoved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
keyword which can be used to set the limit of figures per page.limit
: Sets the maximum number of axes that can be plotted per page when pagination is active.rows
: Sets the maximum number of rows of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.axis
: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.draw
call.figure
: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)legend
: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)
is set.facet
: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.draw
call.colorbar
: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.draw
call. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
- `cpred_color`
- `cpred_linestyle`
- `cpred_linewidth`
- `removed_color`
- `removed_marker`
- `removed_markersize`
- `markercolor`
- `markerstyle`
- `group_fontsize`