Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update themeJasp to themeJaspRaw #5

Merged
merged 2 commits into from
Jan 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ Ancova <- function(dataset=NULL, options, perform="run", callback=function(...)
base_breaks_y(summaryStat, options$plotErrorBars) +
base_breaks_x(summaryStatSubset[,"plotHorizontalAxis"])

p <- JASPgraphs::themeJasp(p, legend.position = "right")
p <- JASPgraphs::themeJaspRaw(p, legend.position = "right")

if (nPlots > 1) {
descriptivesPlot[["title"]] <- paste(options$plotSeparatePlots,": ",subsetPlots[i], sep = "")
Expand Down Expand Up @@ -2638,7 +2638,7 @@ Ancova <- function(dataset=NULL, options, perform="run", callback=function(...)
p <- JASPgraphs::drawPoints(p, dat = data.frame(xVar, yVar), size = 3)

# JASP theme
p <- JASPgraphs::themeJasp(p)
p <- JASPgraphs::themeJaspRaw(p)

content <- .writeImage(width = options$plotWidthQQPlot,
height = options$plotHeightQQPlot,
Expand Down
14 changes: 7 additions & 7 deletions R/regressionlinearbayesian.R
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ RegressionLinearBayesian <- function (
ggplot2::geom_text(data = dfCriText, mapping = ggplot2::aes(x = x, y = y, label = label), size = 6,
hjust = c("right", "left"), inherit.aes = FALSE)

g <- JASPgraphs::themeJasp(g)
g <- JASPgraphs::themeJaspRaw(g)

return(g)
}
Expand Down Expand Up @@ -1337,7 +1337,7 @@ RegressionLinearBayesian <- function (
g <- JASPgraphs::drawSmooth(g, dat = dfPoints, color = "red", alpha = .7) +
ggplot2::ylab("Residuals") +
ggplot2::scale_x_continuous(name = "Predictions under BMA", breaks = xBreaks, limits = range(xBreaks))
g <- JASPgraphs::themeJasp(g)
g <- JASPgraphs::themeJaspRaw(g)

return(g)

Expand All @@ -1356,7 +1356,7 @@ RegressionLinearBayesian <- function (
g <- JASPgraphs::drawPoints(g, dat = dfPoints, size = 4) +
ggplot2::scale_y_continuous(name = "Cumulative Probability", limits = 0:1) +
ggplot2::scale_x_continuous(name = "Model Search Order", breaks = xBreaks)
g <- JASPgraphs::themeJasp(g)
g <- JASPgraphs::themeJaspRaw(g)
return(g)
}
if (show[3]) {
Expand All @@ -1374,7 +1374,7 @@ RegressionLinearBayesian <- function (
g <- JASPgraphs::drawPoints(dat = dfPoints, size = 4) +
ggplot2::scale_y_continuous(name = "Log(P(data|M))", breaks = yBreaks, limits = range(yBreaks)) +
ggplot2::scale_x_continuous(name = "Model Dimension", breaks = xBreaks)
g <- JASPgraphs::themeJasp(g)
g <- JASPgraphs::themeJaspRaw(g)
return(g)

}
Expand Down Expand Up @@ -1411,7 +1411,7 @@ RegressionLinearBayesian <- function (
ggplot2::xlab("") +
ggplot2::scale_linetype_manual(name = "", values = 2, labels = "Prior\nInclusion\nProbabilities")

g <- JASPgraphs::themeJasp(g, horizontal = TRUE, legend.position = "right") +
g <- JASPgraphs::themeJaspRaw(g, horizontal = TRUE, legend.position = "right") +
ggplot2::theme(
legend.title = ggplot2::element_text(size = .8*JASPgraphs::graphOptions("fontsize"))
)
Expand Down Expand Up @@ -1500,7 +1500,7 @@ RegressionLinearBayesian <- function (
xTrans = scales::reverse_trans())
g <- JASPgraphs::drawLines(g, dat = dfLines, mapping = ggplot2::aes(x = x, y = y, group = g),
color = "gray50", alpha = .7, size = 2)
g <- JASPgraphs::themeJasp(graph = g, legend.position = "right", axisTickLength = 0,
g <- JASPgraphs::themeJaspRaw(graph = g, legend.position = "right", axisTickLength = 0,
bty = "o")

# this plot needs some additional treatment
Expand Down Expand Up @@ -1547,7 +1547,7 @@ RegressionLinearBayesian <- function (
ggplot2::geom_errorbar(, width = 0.2) +
ggplot2::scale_x_discrete(name = "") +
ggplot2::scale_y_continuous(name = expression(beta), breaks = yBreaks, limits = range(yBreaks))
plotObj <- JASPgraphs::themeJasp(g) +
plotObj <- JASPgraphs::themeJaspRaw(g) +
ggplot2::theme(
axis.title.y = ggplot2::element_text(angle = 0, vjust = .5, size = 20)
)
Expand Down