@@ -24,7 +24,7 @@ print_tidymodels <- function(tidymodels_object) {
24
24
}
25
25
}
26
26
}
27
- theme_update(axis.title = element_text(size = 14 )) # modify axis label size in plots
27
+ theme_update(axis.title = element_text(size = 12 )) # modify axis label size in plots
28
28
```
29
29
30
30
## Overview
@@ -150,7 +150,7 @@ eda <- ggplot(sacramento, aes(x = sqft, y = price)) +
150
150
xlab("House size (square feet)") +
151
151
ylab("Price (USD)") +
152
152
scale_y_continuous(labels = dollar_format()) +
153
- theme(text = element_text(size = 14 ))
153
+ theme(text = element_text(size = 12 ))
154
154
155
155
eda
156
156
```
@@ -206,7 +206,7 @@ small_plot <- ggplot(small_sacramento, aes(x = sqft, y = price)) +
206
206
ylab("Price (USD)") +
207
207
scale_y_continuous(labels = dollar_format()) +
208
208
geom_vline(xintercept = 2000, linetype = "dotted") +
209
- theme(text = element_text(size = 14 ))
209
+ theme(text = element_text(size = 12 ))
210
210
211
211
small_plot
212
212
```
@@ -525,8 +525,8 @@ for (i in 1:6) {
525
525
scale_y_continuous(labels = dollar_format()) +
526
526
geom_line(data = sacr_preds, aes(x = sqft, y = .pred), color = "blue") +
527
527
ggtitle(paste0("K = ", gridvals[[i]])) +
528
- theme(text = element_text(size = 16 ))
529
- } else {
528
+ theme(text = element_text(size = 20), axis.title=element_text(size=20 ))
529
+ } else {
530
530
plots[[i]] <- ggplot(sacr_preds, aes(x = sqft, y = price)) +
531
531
geom_point(alpha = 0.4) +
532
532
xlab("House size (square feet)") +
@@ -537,7 +537,7 @@ for (i in 1:6) {
537
537
yintercept = mean(sacr_preds$price),
538
538
color = "blue") +
539
539
ggtitle(paste0("K = ", gridvals[[i]])) +
540
- theme(text = element_text(size = 16))
540
+ theme(text = element_text(size = 20), axis.title=element_text(size=20))
541
541
}
542
542
}
543
543
@@ -661,7 +661,7 @@ plot_final <- ggplot(sacramento_train, aes(x = sqft, y = price)) +
661
661
ylab("Price (USD)") +
662
662
scale_y_continuous(labels = dollar_format()) +
663
663
ggtitle(paste0("K = ", kmin)) +
664
- theme(text = element_text(size = 14 ))
664
+ theme(text = element_text(size = 12 ))
665
665
666
666
plot_final
667
667
```
@@ -698,7 +698,7 @@ plot_beds <- sacramento |>
698
698
ggplot(aes(x = beds, y = price)) +
699
699
geom_point(alpha = 0.4) +
700
700
labs(x = 'Number of Bedrooms', y = 'Price (USD)') +
701
- theme(text = element_text(size = 14 ))
701
+ theme(text = element_text(size = 12 ))
702
702
703
703
plot_beds
704
704
```
0 commit comments