@@ -5,6 +5,7 @@ library(gridExtra)
5
5
library(cowplot)
6
6
library(stringr)
7
7
library(knitr)
8
+ library(ggplot2)
8
9
9
10
knitr::opts_chunk$set(fig.align = "center")
10
11
@@ -24,6 +25,9 @@ print_tidymodels <- function(tidymodels_object) {
24
25
}
25
26
}
26
27
}
28
+
29
+ theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
30
+
27
31
```
28
32
29
33
## Overview
@@ -227,7 +231,8 @@ perim_concav <- cancer |>
227
231
geom_point(alpha = 0.5) +
228
232
labs(color = "Diagnosis") +
229
233
scale_color_manual(labels = c("Malignant", "Benign"),
230
- values = c("orange2", "steelblue2"))
234
+ values = c("orange2", "steelblue2")) +
235
+ theme(text = element_text(size = 14))
231
236
232
237
perim_concav
233
238
```
@@ -782,7 +787,8 @@ as shown in Figure \@ref(fig:06-find-k).
782
787
accuracy_vs_k <- ggplot(accuracies, aes(x = neighbors, y = mean)) +
783
788
geom_point() +
784
789
geom_line() +
785
- labs(x = "Neighbors", y = "Accuracy Estimate")
790
+ labs(x = "Neighbors", y = "Accuracy Estimate") +
791
+ theme(text = element_text(size = 14))
786
792
787
793
accuracy_vs_k
788
794
```
@@ -839,7 +845,8 @@ accuracies <- knn_results |>
839
845
accuracy_vs_k_lots <- ggplot(accuracies, aes(x = neighbors, y = mean)) +
840
846
geom_point() +
841
847
geom_line() +
842
- labs(x = "Neighbors", y = "Accuracy Estimate")
848
+ labs(x = "Neighbors", y = "Accuracy Estimate") +
849
+ theme(text = element_text(size = 14))
843
850
844
851
accuracy_vs_k_lots
845
852
```
0 commit comments