Skip to content

Commit f2b0882

Browse files
committed
size to linewidth
1 parent c359bab commit f2b0882

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

R/commonMachineLearningRegression.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@
612612
nTest <- result[["ntest"]]
613613
plotData <- data.frame(y = c(nTrain, nTest), x = c("Train", "Test"), group = c(1, 1))
614614
p <- ggplot2::ggplot(data = plotData, mapping = ggplot2::aes(x = group, y = y, fill = factor(x, levels = c("Test", "Train")))) +
615-
ggplot2::geom_bar(stat = "identity", col = "black", size = 0.5) +
615+
ggplot2::geom_bar(stat = "identity", col = "black", linewidth = 0.5) +
616616
ggplot2::scale_y_continuous(name = NULL, limits = c(0, nTrain + nTest + ((nTrain + nTest) / 5))) + # adjust limits to include "Total" text
617617
ggplot2::coord_flip() +
618618
ggplot2::labs(x = NULL) +
@@ -629,7 +629,7 @@
629629
nTest <- result[["ntest"]]
630630
plotData <- data.frame(y = c(nTrain, nValid, nTest), x = c("Train", "Validation", "Test"), group = c(1, 1, 1))
631631
p <- ggplot2::ggplot(data = plotData, mapping = ggplot2::aes(x = group, y = y, fill = factor(x, levels = c("Test", "Validation", "Train")))) +
632-
ggplot2::geom_bar(stat = "identity", col = "black", size = 0.5) +
632+
ggplot2::geom_bar(stat = "identity", col = "black", linewidth = 0.5) +
633633
ggplot2::scale_y_continuous(name = NULL, limits = c(0, nTrain + nValid + nTest + ((nTrain + nValid + nTest) / 5))) + # adjust limits to include "Total" text
634634
ggplot2::coord_flip() +
635635
ggplot2::labs(x = NULL) +
@@ -651,7 +651,7 @@
651651
nTest <- result[["ntest"]]
652652
plotData <- data.frame(y = c(nTrainAndValid, nTest), x = c("Train and validation", "Test"), group = c(1, 1))
653653
p <- ggplot2::ggplot(data = plotData, mapping = ggplot2::aes(x = group, y = y, fill = factor(x, levels = c("Test", "Train and validation")))) +
654-
ggplot2::geom_bar(stat = "identity", col = "black", size = 0.5) +
654+
ggplot2::geom_bar(stat = "identity", col = "black", linewidth = 0.5) +
655655
ggplot2::scale_y_continuous(name = NULL, limits = c(0, nTrainAndValid + nTest + ((nTrainAndValid + nTest) / 5))) + # adjust limits to include "Total" text
656656
ggplot2::coord_flip() +
657657
ggplot2::xlab(NULL) +

R/mlRegressionBoosting.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ mlRegressionBoosting <- function(jaspResults, dataset, options, ...) {
261261
mapping = ggplot2::aes(x = xstart, xend = xend, y = ystart, yend = yend), linetype = "dashed", col = "darkgrey"
262262
) +
263263
jaspGraphs::geom_line(mapping = ggplot2::aes(linetype = type)) +
264-
ggplot2::geom_smooth(method = "loess", formula = y ~ x, size = 1, colour = "darkred", se = FALSE) +
264+
ggplot2::geom_smooth(method = "loess", formula = y ~ x, linewidth = 1, colour = "darkred", se = FALSE) +
265265
ggplot2::scale_x_continuous(name = gettext("Number of Trees"), labels = xLabels, breaks = xBreaks, limits = c(0, max(xBreaks))) +
266266
ggplot2::scale_y_continuous(name = ylab, labels = yLabels, breaks = yBreaks, limits = range(yBreaks)) +
267267
ggplot2::labs(linetype = NULL) +

R/mlRegressionDecisionTree.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ mlRegressionDecisionTree <- function(jaspResults, dataset, options, state = NULL
318318
}
319319
}
320320
p <- p + ggparty::geom_edge() +
321-
ggparty::geom_edge_label(fill = "white", col = "darkred") +
321+
ggparty::geom_edge_label(fill = "white", col = "darkred", linewidth = 0) +
322322
ggparty::geom_node_splitvar(mapping = ggplot2::aes(size = max(3, nodesize) / 2, label = info), fill = "white", col = "black") +
323323
ggparty::geom_node_label(mapping = ggplot2::aes(label = info, size = max(3, nodesize) / 2), ids = "terminal", fill = cols, col = "black", alpha = alpha) +
324324
ggplot2::scale_x_continuous(name = NULL, limits = c(min(p$data$x) - abs(0.1 * min(p$data$x)), max(p$data$x) * 1.1)) +

R/mlRegressionKnn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ mlRegressionKnn <- function(jaspResults, dataset, options, state = NULL) {
294294
yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(0, 1), min.n = 4) # 0.001 for Inf at x = 0 in 'inv' weights
295295
plotFunc <- function(x) func(x) / func(0.001)
296296
p <- ggplot2::ggplot() +
297-
ggplot2::stat_function(fun = plotFunc, size = 1, xlim = c(0.001, 1)) +
297+
ggplot2::stat_function(fun = plotFunc, linewidth = 1, xlim = c(0.001, 1)) +
298298
ggplot2::scale_x_continuous(name = gettext("Proportion of Max. Distance"), breaks = xBreaks, limits = c(0, 1)) +
299299
ggplot2::scale_y_continuous(name = gettext("Relative Weight"), breaks = yBreaks, limits = c(0, 1)) +
300300
jaspGraphs::geom_rangeframe() +

R/mlRegressionNeuralNetwork.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mlRegressionNeuralNetwork <- function(jaspResults, dataset, options, ...) {
510510
xBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-6, 6), min.n = 4)
511511
yBreaks <- jaspGraphs::getPrettyAxisBreaks(c(-1, 1), min.n = 4)
512512
p <- ggplot2::ggplot() +
513-
ggplot2::stat_function(fun = ac, size = 1) +
513+
ggplot2::stat_function(fun = ac, linewidth = 1) +
514514
ggplot2::scale_x_continuous(name = gettext("Input"), breaks = xBreaks, limits = c(-6, 6)) +
515515
ggplot2::scale_y_continuous(name = gettext("Output"), breaks = yBreaks, limits = c(-1, 1)) +
516516
jaspGraphs::geom_rangeframe() +

0 commit comments

Comments
 (0)