Skip to content

Commit

Permalink
Kleines Upsi mit aes und ggplot2
Browse files Browse the repository at this point in the history
  • Loading branch information
mhesselbarth committed Dec 21, 2023
1 parent 8364d4f commit 6d869f0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions R/engine_breg.R
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ engine_breg <- function(x,
# Make a plot
g <- ggplot2::ggplot(data = o, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic(base_size = 18) +
ggplot2::geom_ribbon(aes(ymin = q05, ymax = q95), fill = "grey90") +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_ribbon(ggplot2::aes(ymin = q05, ymax = q95), fill = "grey90") +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
2 changes: 1 addition & 1 deletion R/engine_gdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ engine_gdb <- function(x,
if(plot){
g <- ggplot2::ggplot(data = out, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
2 changes: 1 addition & 1 deletion R/engine_glm.R
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ engine_glm <- function(x,
# Make a plot
g <- ggplot2::ggplot(data = pp, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
2 changes: 1 addition & 1 deletion R/engine_glmnet.R
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ engine_glmnet <- function(x,
# Make a plot
g <- ggplot2::ggplot(data = pp, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
4 changes: 2 additions & 2 deletions R/engine_inlabru.R
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,8 @@ engine_inlabru <- function(x,
if(plot){
g <- ggplot2::ggplot(data = o, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_ribbon(aes(ymin = lower, ymax = upper), fill = "grey90") +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_ribbon(ggplot2::aes(ymin = lower, ymax = upper), fill = "grey90") +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
2 changes: 1 addition & 1 deletion R/engine_xgboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ engine_xgboost <- function(x,
# Make a plot
g <- ggplot2::ggplot(data = pp, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down
4 changes: 2 additions & 2 deletions R/utils-bart.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ bart_partial_effect <- function (model, x.var = NULL, equal = FALSE,
# Construct overall plot.
g <- ggplot2::ggplot(data = out, ggplot2::aes(x = partial_effect)) +
ggplot2::theme_classic() +
ggplot2::geom_ribbon(aes(ymin = q05, ymax = q95), fill = "grey90") +
ggplot2::geom_line(aes(y = mean)) +
ggplot2::geom_ribbon(ggplot2::aes(ymin = q05, ymax = q95), fill = "grey90") +
ggplot2::geom_line(ggplot2::aes(y = mean)) +
ggplot2::facet_wrap(. ~ variable, scales = "free") +
ggplot2::labs(x = "", y = "Partial effect")
print(g)
Expand Down

0 comments on commit 6d869f0

Please sign in to comment.