NCAUtilities Docstrings

NCAUtilities.dose_vs_dose_normalizedMethod
dose_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 a Symbol.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
NCAUtilities.groups_checkMethod
groups_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: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
NCAUtilities.jointitleFunction
jointitle(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_distMethod
parameters_dist!(axis, report)
parameters_dist(figpos, report)
parameters_dist(report)

Keywords

  • parameter: The name of the parameter to plot given as a Symbol.

  • group: Select which group from stratified input data to plot.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
NCAUtilities.parameters_vs_groupMethod
parameters_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 a Symbol.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
NCAUtilities.power_modelMethod
power_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 a Symbol.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
NCAUtilities.removed_points_tableFunction
removed_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 the time and concentration columns.
  • escape is a function that controls how strings are escaped, defaults to LaTeX escaping.
NCAUtilities.short_stringMethod
short_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_timeMethod
summary_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 to false to hide error bars.

  • separate: Set to false to overlay all groups on a single axis.

  • show_subjects: Set to true to overlay individual traces ("spaghetti plots")

  • group: Select which group from stratified input data to plot.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color: Either any scalar color that Makie can handle, or if separate = false and the population is grouped, a vector of colors (for example using Makie.categorical_colors or manually specified) or a PlotUtils.CategoricalColorGradient (what Makie.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!Method
observations_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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 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 a NamedTuple with any of the following keys and your custom label string: observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linestyle
  • linewidth
  • markercolor
  • markersize
PlottingUtilities.observations_vs_timeMethod
observations_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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 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 a NamedTuple with any of the following keys and your custom label string: observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linestyle
  • linewidth
  • markercolor
  • markersize
PlottingUtilities.subject_fits!Method
subject_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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 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 a NamedTuple with any of the following keys and your custom label string: observed, cpred, and removed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. 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_fitsMethod
subject_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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 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 a NamedTuple with any of the following keys and your custom label string: observed, cpred, and removed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit 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 paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. 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