Skip to content

Commit

Permalink
size_line -> linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Nov 21, 2024
1 parent 779588a commit 21a9a9a
Show file tree
Hide file tree
Showing 27 changed files with 113 additions and 113 deletions.
8 changes: 4 additions & 4 deletions R/plot.binned_residuals.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @export
plot.see_binned_residuals <- function(x,
size_line = 0.7,
linewidth = 0.7,
size_point = 2.2,
size_title = 12,
size_axis_title = base_size,
Expand Down Expand Up @@ -62,7 +62,7 @@ plot.see_binned_residuals <- function(x,
se = FALSE,
formula = y ~ s(x, bs = "tp"),
colour = colors[3],
linewidth = size_line
linewidth = linewidth
)
}

Expand All @@ -89,7 +89,7 @@ plot.see_binned_residuals <- function(x,
ggplot2::geom_point(ggplot2::aes(y = .data$ybar), size = size_point) +
ggplot2::geom_errorbar(
ggplot2::aes(ymin = .data$CI_low, ymax = .data$CI_high),
linewidth = size_line,
linewidth = linewidth,
width = 0
)
} else {
Expand All @@ -101,7 +101,7 @@ plot.see_binned_residuals <- function(x,
ymax = .data$CI_high,
colour = .data$group
),
linewidth = size_line,
linewidth = linewidth,
width = 0
)
}
Expand Down
8 changes: 4 additions & 4 deletions R/plot.check_collinearity.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plot.see_check_collinearity <- function(x,
data = NULL,
colors = c("#3aaf85", "#1b6ca8", "#cd201f"),
size_point = 3.5,
size_line = 0.8,
linewidth = 0.8,
size_title = 12,
size_axis_title = base_size,
base_size = 10,
Expand Down Expand Up @@ -53,7 +53,7 @@ plot.see_check_collinearity <- function(x,
.plot_diag_vif(
dat,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
size_title = size_title,
size_axis_title = size_axis_title,
base_size = base_size,
Expand All @@ -66,7 +66,7 @@ plot.see_check_collinearity <- function(x,

.plot_diag_vif <- function(x,
size_point,
size_line,
linewidth,
theme_style = theme_lucid,
size_title = 12,
size_axis_title = 10,
Expand Down Expand Up @@ -132,7 +132,7 @@ plot.see_check_collinearity <- function(x,
if (!is.null(ci_data)) {
p <- p +
ggplot2::geom_linerange(
linewidth = size_line,
linewidth = linewidth,
na.rm = TRUE
) +
ggplot2::geom_segment(
Expand Down
4 changes: 2 additions & 2 deletions R/plot.check_heteroscedasticity.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
plot.see_check_heteroscedasticity <- function(x,
data = NULL,
size_point = 2,
size_line = 0.8,
linewidth = 0.8,
size_title = 12,
size_axis_title = base_size,
base_size = 10,
Expand Down Expand Up @@ -79,7 +79,7 @@ plot.see_check_heteroscedasticity <- function(x,
.plot_diag_homogeneity(
dat,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
base_size = base_size,
size_title = size_title,
size_axis_title = size_axis_title,
Expand Down
4 changes: 2 additions & 2 deletions R/plot.check_homogeneity.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {

.plot_diag_homogeneity <- function(x,
size_point,
size_line,
linewidth,
alpha_level = 0.2,
theme_style = theme_lucid,
size_title = 12,
Expand All @@ -159,7 +159,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {
se = TRUE,
alpha = alpha_level,
formula = y ~ x,
linewidth = size_line,
linewidth = linewidth,
colour = colors[1]
) +
ggplot2::labs(
Expand Down
26 changes: 13 additions & 13 deletions R/plot.check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ plot.see_check_model <- function(x,
panel <- attr(x, "panel")
check <- attr(x, "check")
size_point <- attr(x, "dot_size")
size_line <- attr(x, "line_size")
linewidth <- attr(x, "line_size")
show_labels <- attr(x, "show_labels") %||% TRUE
size_text <- attr(x, "text_size")
base_size <- attr(x, "base_size")
Expand Down Expand Up @@ -101,7 +101,7 @@ plot.see_check_model <- function(x,
p$PP_CHECK <- plot.see_performance_pp_check(
x$PP_CHECK,
style = style,
size_line = size_line,
linewidth = linewidth,
size_point = size_point,
base_size = base_size,
size_axis_title = size_axis_title,
Expand All @@ -117,7 +117,7 @@ plot.see_check_model <- function(x,
p$NCV <- .plot_diag_linearity(
x$NCV,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
alpha_level = alpha_level,
theme_style = style,
base_size = base_size,
Expand Down Expand Up @@ -152,7 +152,7 @@ plot.see_check_model <- function(x,
size_axis_title = size_axis_title,
size_title = size_title,
colors = colors[c(1, 2)],
size_line = size_line,
linewidth = linewidth,
type = overdisp_type
)
}
Expand All @@ -161,7 +161,7 @@ plot.see_check_model <- function(x,
p$HOMOGENEITY <- .plot_diag_homogeneity(
x$HOMOGENEITY,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
alpha_level = alpha_level,
theme_style = style,
base_size = base_size,
Expand All @@ -178,7 +178,7 @@ plot.see_check_model <- function(x,
x$INFLUENTIAL,
show_labels = show_labels,
size_text = size_text,
size_line = size_line,
linewidth = linewidth,
size_point = size_point,
theme_style = style,
size_axis_title = size_axis_title,
Expand All @@ -194,7 +194,7 @@ plot.see_check_model <- function(x,
p$VIF <- .plot_diag_vif(
x$VIF,
size_point = 1.5 * size_point,
size_line = size_line,
linewidth = linewidth,
theme_style = style,
base_size = base_size,
size_axis_title = size_axis_title,
Expand All @@ -209,7 +209,7 @@ plot.see_check_model <- function(x,
if (inherits(x$QQ, "performance_simres")) {
p$QQ <- plot(
x$QQ,
size_line = size_line,
linewidth = linewidth,
size_point = 0.9 * size_point,
alpha = alpha_level,
dot_alpha = dot_alpha_level,
Expand All @@ -224,7 +224,7 @@ plot.see_check_model <- function(x,
p$QQ <- .plot_diag_qq(
x$QQ,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
size_axis_title = size_axis_title,
size_title = size_title,
alpha_level = alpha_level,
Expand All @@ -243,7 +243,7 @@ plot.see_check_model <- function(x,
if ("NORM" %in% names(x) && !is.null(x$NORM) && any(c("normality", "all") %in% check)) {
p$NORM <- .plot_diag_norm(
x$NORM,
size_line = size_line,
linewidth = linewidth,
alpha_level = alpha_level,
theme_style = style,
base_size = base_size,
Expand All @@ -257,7 +257,7 @@ plot.see_check_model <- function(x,
ps <- .plot_diag_reqq(
x$REQQ,
size_point,
size_line,
linewidth,
size_axis_title = size_axis_title,
size_title = size_title,
alpha_level = alpha_level,
Expand Down Expand Up @@ -285,7 +285,7 @@ plot.see_check_model <- function(x,

.plot_diag_linearity <- function(x,
size_point,
size_line,
linewidth,
size_axis_title = 10,
size_title = 12,
alpha_level = 0.2,
Expand All @@ -311,7 +311,7 @@ plot.see_check_model <- function(x,
se = TRUE,
formula = y ~ x,
alpha = alpha_level,
linewidth = size_line,
linewidth = linewidth,
colour = colors[1]
) +
ggplot2::geom_hline(yintercept = 0, linetype = "dashed") +
Expand Down
38 changes: 19 additions & 19 deletions R/plot.check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' Options are `"qq"` (default) for quantile-quantile (Q-Q) plots,
#' `"pp"` for probability-probability (P-P) plots, or
#' `"density"` for density overlay plots.
#' @param size_line Numeric value specifying size of line geoms.
#' @param linewidth Numeric value specifying size of line geoms.
#' @param dot_alpha Numeric value specifying alpha level of the point geoms.
#' @param alpha Numeric value specifying alpha level of the confidence bands.
#' @param colors Character vector of length two, indicating the colors (in
Expand Down Expand Up @@ -42,7 +42,7 @@
plot.see_check_normality <- function(x,
type = c("qq", "pp", "density"),
data = NULL,
size_line = 0.8,
linewidth = 0.8,
size_point = 2,
size_title = 12,
size_axis_title = base_size,
Expand Down Expand Up @@ -71,7 +71,7 @@ plot.see_check_normality <- function(x,
.plot_diag_reqq(
attributes(x)$re_qq,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
alpha_level = alpha,
size_axis_title = size_axis_title,
size_title = size_title,
Expand All @@ -93,7 +93,7 @@ plot.see_check_normality <- function(x,
} else if (inherits(model, "performance_simres")) {
return(plot.see_performance_simres(
model,
size_line = size_line,
linewidth = linewidth,
size_point = size_point,
alpha = alpha,
dot_alpha = dot_alpha,
Expand All @@ -114,7 +114,7 @@ plot.see_check_normality <- function(x,
.plot_diag_qq(
dat,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
size_axis_title = size_axis_title,
size_title = size_title,
base_size = base_size,
Expand Down Expand Up @@ -142,7 +142,7 @@ plot.see_check_normality <- function(x,
)
.plot_diag_norm(
dat,
size_line = size_line,
linewidth = linewidth,
alpha_level = alpha,
base_size = base_size,
size_axis_title = size_axis_title,
Expand All @@ -154,7 +154,7 @@ plot.see_check_normality <- function(x,
.plot_diag_pp(
dat,
size_point = size_point,
size_line = size_line,
linewidth = linewidth,
base_size = base_size,
size_axis_title = size_axis_title,
size_title = size_title,
Expand All @@ -171,7 +171,7 @@ plot.see_check_normality <- function(x,
# normality plot: density -------------------------

.plot_diag_norm <- function(x,
size_line,
linewidth,
size_axis_title = 10,
size_title = 12,
alpha_level = 0.2,
Expand All @@ -189,7 +189,7 @@ plot.see_check_normality <- function(x,
ggplot2::geom_line(
mapping = ggplot2::aes(y = .data$curve),
colour = colors[1],
linewidth = size_line,
linewidth = linewidth,
na.rm = TRUE
) +
ggplot2::labs(
Expand All @@ -213,7 +213,7 @@ plot.see_check_normality <- function(x,

.plot_diag_qq <- function(x,
size_point,
size_line,
linewidth,
size_axis_title = 10,
size_title = 12,
alpha_level = 0.2,
Expand All @@ -239,7 +239,7 @@ plot.see_check_normality <- function(x,
),
ggplot2::geom_qq_line(
ggplot2::aes(sample = .data$y),
linewidth = size_line,
linewidth = linewidth,
colour = colors[1],
distribution = qhalfnorm,
na.rm = TRUE
Expand All @@ -263,7 +263,7 @@ plot.see_check_normality <- function(x,
detrend = detrend
),
qqplotr::stat_qq_line(
linewidth = size_line,
linewidth = linewidth,
colour = colors[1],
detrend = detrend
)
Expand All @@ -287,13 +287,13 @@ plot.see_check_normality <- function(x,
if (detrend) {
ggplot2::geom_hline(
yintercept = 0,
linewidth = size_line,
linewidth = linewidth,
colour = colors[1],
na.rm = TRUE
)
} else {
ggplot2::geom_qq_line(
linewidth = size_line,
linewidth = linewidth,
colour = colors[1],
na.rm = TRUE
)
Expand Down Expand Up @@ -349,7 +349,7 @@ plot.see_check_normality <- function(x,

.plot_diag_pp <- function(x,
size_point,
size_line,
linewidth,
size_axis_title = base_size,
size_title = 12,
alpha_level = 0.2,
Expand All @@ -363,7 +363,7 @@ plot.see_check_normality <- function(x,
p_plot <- ggplot2::ggplot(x, ggplot2::aes(sample = .data$res)) +
qqplotr::stat_pp_band(alpha = alpha_level, detrend = detrend, bandType = method) +
qqplotr::stat_pp_line(
linewidth = size_line,
linewidth = linewidth,
colour = colors[1],
detrend = detrend
) +
Expand All @@ -384,7 +384,7 @@ plot.see_check_normality <- function(x,
p_plot <- ggplot2::ggplot(x, ggplot2::aes(x = .data$probs, y = .data$y)) +
ggplot2::geom_abline(
slope = if (detrend) 0 else 1,
linewidth = size_line,
linewidth = linewidth,
colour = colors[1]
) +
geom_point2(
Expand Down Expand Up @@ -422,7 +422,7 @@ plot.see_check_normality <- function(x,

.plot_diag_reqq <- function(x,
size_point,
size_line,
linewidth,
size_axis_title = base_size,
size_title = 12,
panel = TRUE,
Expand All @@ -444,7 +444,7 @@ plot.see_check_normality <- function(x,
ggplot2::stat_smooth(
method = "lm",
alpha = alpha_level,
linewidth = size_line,
linewidth = linewidth,
formula = y ~ x,
colour = colors[1]
) +
Expand Down
Loading

0 comments on commit 21a9a9a

Please sign in to comment.