NCAUtilities
Docstrings
NCAUtilities.dose_vs_dose_normalized
— Methoddose_vs_dose_normalized!(axis, doselinearitypowermodel)
dose_vs_dose_normalized(figpos, doselinearitypowermodel)
dose_vs_dose_normalized(doselinearitypowermodel)
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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
NCAUtilities.groups_check
— Methodgroups_check!(axis, population | report)
groups_check(figpos, population | report)
groups_check(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodparameters_dist!(axis, report)
parameters_dist(figpos, report)
parameters_dist(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
strokecolor
strokewidth
NCAUtilities.parameters_vs_group
— Methodparameters_vs_group!(axis, report)
parameters_vs_group(figpos, report)
parameters_vs_group(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
NCAUtilities.power_model
— Methodpower_model!(axis, doselinearitypowermodel)
power_model(figpos, doselinearitypowermodel)
power_model(doselinearitypowermodel)
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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
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
— Methodsummary_observations_vs_time!(axis, population | report)
summary_observations_vs_time(figpos, population | report)
summary_observations_vs_time(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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!
— Methodobservations_vs_time!(axis, subject | population | report)
observations_vs_time(figpos, subject | population | report)
observations_vs_time(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
linestyle
linewidth
markercolor
markersize
PlottingUtilities.observations_vs_time
— Methodobservations_vs_time!(axis, subject | population | report)
observations_vs_time(figpos, subject | population | report)
observations_vs_time(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
linestyle
linewidth
markercolor
markersize
PlottingUtilities.subject_fits!
— Methodsubject_fits!(axis, subject | population | report)
subject_fits(figpos, subject | population | report)
subject_fits(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
cpred_color
cpred_linestyle
cpred_linewidth
removed_color
removed_marker
removed_markersize
markercolor
markerstyle
PlottingUtilities.subject_fits
— Methodsubject_fits!(axis, subject | population | report)
subject_fits(figpos, subject | population | report)
subject_fits(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.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
cpred_color
cpred_linestyle
cpred_linewidth
removed_color
removed_marker
removed_markersize
markercolor
markerstyle