Skip to content

Commit

Permalink
Switch to linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-long committed Jan 7, 2024
1 parent 02aa7dd commit 58efd83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/cat_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ plot_cat <- function(predictions, pred, modx = NULL, mod2 = NULL,

if (geom == "line") {
p <- p + geom_path(position = position_dodge(dodge.width),
size = line.thickness)
linewidth = line.thickness)
}

# Plot intervals if requested
Expand All @@ -420,12 +420,12 @@ plot_cat <- function(predictions, pred, modx = NULL, mod2 = NULL,
alpha = 1, show.legend = FALSE,
position = position_dodge(dodge.width),
width = errorbar.width,
size = line.thickness)
linewidth = line.thickness)
} else if (interval == TRUE & interval.geom[1] %in% c("line", "linerange")) {
p <- p + geom_linerange(aes(ymin = !! sym("ymin"), ymax = !! sym("ymax")),
alpha = 0.8, show.legend = FALSE,
position = position_dodge(dodge.width),
size = line.thickness)
linewidth = line.thickness)
}

# If third mod, facet by third mod
Expand Down
2 changes: 1 addition & 1 deletion R/interact_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ plot_mod_continuous <- function(predictions, pred, modx, resp, mod2 = NULL,
p <- ggplot(pm, aes(x = !! pred, y = !! resp, colour = !! modx,
group = !! grp, linetype = !! lty))

p <- p + geom_path(size = line.thickness, show.legend = !facet.modx)
p <- p + geom_path(linewidth = line.thickness, show.legend = !facet.modx)

# Plot intervals if requested
if (interval == TRUE) {
Expand Down

0 comments on commit 58efd83

Please sign in to comment.