Skip to content

Commit 7e8f42d

Browse files
committed
changing axes size to 12
1 parent 659ee46 commit 7e8f42d

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

classification1.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ print_tidymodels <- function(tidymodels_object) {
3333
}
3434
}
3535
36-
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
36+
theme_update(axis.title = element_text(size = 12)) # modify axis label size in plots
3737
```
3838

3939
## Overview
@@ -240,7 +240,7 @@ perim_concav <- cancer |>
240240
color = "Diagnosis") +
241241
scale_color_manual(labels = c("Malignant", "Benign"),
242242
values = c("orange2", "steelblue2")) +
243-
theme(text = element_text(size = 14))
243+
theme(text = element_text(size = 12))
244244
perim_concav
245245
```
246246

@@ -1061,7 +1061,7 @@ ggplot(unscaled_cancer, aes(x = Area,
10611061
facet_zoom(x = ( Area > 380 & Area < 420) ,
10621062
y = (Smoothness > 0.08 & Smoothness < 0.14), zoom.size = 2) +
10631063
theme_bw() +
1064-
theme(text = element_text(size = 14), legend.position="bottom")
1064+
theme(text = element_text(size = 12), legend.position="bottom")
10651065
```
10661066

10671067
### Balancing
@@ -1108,7 +1108,7 @@ rare_plot <- rare_cancer |>
11081108
color = "Diagnosis") +
11091109
scale_color_manual(labels = c("Malignant", "Benign"),
11101110
values = c("orange2", "steelblue2")) +
1111-
theme(text = element_text(size = 14))
1111+
theme(text = element_text(size = 12))
11121112
11131113
rare_plot
11141114
```
@@ -1404,7 +1404,7 @@ wkflw_plot <-
14041404
y = "Smoothness (standardized)") +
14051405
scale_color_manual(labels = c("Malignant", "Benign"),
14061406
values = c("orange2", "steelblue2")) +
1407-
theme(text = element_text(size = 14))
1407+
theme(text = element_text(size = 12))
14081408
14091409
wkflw_plot
14101410
```

clustering.Rmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ knitr::opts_chunk$set(warning = FALSE, fig.align = "default")
1717
cbbPalette <- c(brewer.pal(9, "Paired"))
1818
cbpalette <- c("darkorange3", "dodgerblue3", "goldenrod1")
1919
20-
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
20+
theme_update(axis.title = element_text(size = 12)) # modify axis label size in plots
2121
```
2222

2323
## Overview
@@ -174,7 +174,7 @@ ggplot(data, aes(x = flipper_length_standardized,
174174
geom_point() +
175175
xlab("Flipper Length (standardized)") +
176176
ylab("Bill Length (standardized)") +
177-
theme(text = element_text(size = 14))
177+
theme(text = element_text(size = 12))
178178
```
179179

180180
Based \index{ggplot}\index{ggplot!geom\_point} on the visualization
@@ -473,7 +473,7 @@ for (i in 1:4) {
473473
color = "black",
474474
fill = cbpalette) +
475475
annotate("text", x = -0.5, y = 1.5, label = paste0("Iteration ", i), size = 5)+
476-
theme(text = element_text(size = 14))
476+
theme(text = element_text(size = 12))
477477
478478
if (i == 1 | i == 2) {
479479
plt_ctr <- plt_ctr +
@@ -507,7 +507,7 @@ for (i in 1:4) {
507507
color = "black",
508508
fill = cbpalette) +
509509
annotate("text", x = -0.5, y = 1.5, label = paste0("Iteration ", i), size = 5)+
510-
theme(text = element_text(size = 14))
510+
theme(text = element_text(size = 12))
511511
512512
if (i == 1 | i ==2) {
513513
plt_lbl <- plt_lbl +
@@ -646,7 +646,7 @@ for (i in 1:5) {
646646
color = "black",
647647
fill = cbpalette) +
648648
annotate("text", x = -0.5, y = 1.5, label = paste0("Iteration ", i), size = 5) +
649-
theme(text = element_text(size = 14))
649+
theme(text = element_text(size = 12))
650650
651651
if (i == 1 | i == 2) {
652652
plt_ctr <- plt_ctr +
@@ -679,7 +679,7 @@ for (i in 1:5) {
679679
color = "black",
680680
fill = cbpalette) +
681681
annotate("text", x = -0.5, y = 1.5, label = paste0("Iteration ", i), size = 5) +
682-
theme(text = element_text(size = 14))
682+
theme(text = element_text(size = 12))
683683
684684
if (i == 1 | i == 2) {
685685
plt_lbl <- plt_lbl +
@@ -942,7 +942,7 @@ cluster_plot <- ggplot(clustered_data,
942942
scale_color_manual(values = c("dodgerblue3",
943943
"darkorange3",
944944
"goldenrod1")) +
945-
theme(text = element_text(size = 14))
945+
theme(text = element_text(size = 12))
946946
947947
cluster_plot
948948
```
@@ -1045,7 +1045,7 @@ elbow_plot <- ggplot(clustering_statistics, aes(x = k, y = tot.withinss)) +
10451045
xlab("K") +
10461046
ylab("Total within-cluster sum of squares") +
10471047
scale_x_continuous(breaks = 1:9) +
1048-
theme(text = element_text(size = 14))
1048+
theme(text = element_text(size = 12))
10491049
10501050
elbow_plot
10511051
```
@@ -1088,7 +1088,7 @@ elbow_plot <- ggplot(clustering_statistics, aes(x = k, y = tot.withinss)) +
10881088
xlab("K") +
10891089
ylab("Total within-cluster sum of squares") +
10901090
scale_x_continuous(breaks = 1:9) +
1091-
theme(text = element_text(size = 14))
1091+
theme(text = element_text(size = 12))
10921092
10931093
elbow_plot
10941094
```

inference.Rmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ min_x <- function(dist) {
2121
min(ggp_data$data[[1]]$xmin)
2222
}
2323
24-
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
24+
theme_update(axis.title = element_text(size = 12)) # modify axis label size in plots
2525
```
2626

2727
## Overview
@@ -294,7 +294,7 @@ sampling_distribution <- ggplot(sample_estimates, aes(x = sample_proportion)) +
294294
geom_histogram(fill = "dodgerblue3", color = "lightgrey", bins = 12) +
295295
ylab("Count") +
296296
xlab("Sample proportions") +
297-
theme(text = element_text(size = 14))
297+
theme(text = element_text(size = 12))
298298
299299
sampling_distribution
300300
```
@@ -343,7 +343,7 @@ population_distribution <- ggplot(airbnb, aes(x = price)) +
343343
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
344344
ylab("Count") +
345345
xlab("Price per night (Canadian dollars)") +
346-
theme(text = element_text(size = 14))
346+
theme(text = element_text(size = 12))
347347
348348
population_distribution
349349
```
@@ -389,7 +389,7 @@ sample_distribution <- ggplot(one_sample, aes(price)) +
389389
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
390390
ylab("Count") +
391391
xlab("Price per night (Canadian dollars)") +
392-
theme(text = element_text(size = 14))
392+
theme(text = element_text(size = 12))
393393
394394
sample_distribution
395395
@@ -438,7 +438,7 @@ sampling_distribution_40 <- ggplot(sample_estimates, aes(x = sample_mean)) +
438438
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
439439
ylab("Count") +
440440
xlab("Sample mean price per night (Canadian dollars)") +
441-
theme(text = element_text(size = 14))
441+
theme(text = element_text(size = 12))
442442
443443
sampling_distribution_40
444444
```
@@ -786,7 +786,7 @@ one_sample_dist <- ggplot(one_sample, aes(price)) +
786786
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
787787
ylab("Count") +
788788
xlab("Price per night (Canadian dollars)") +
789-
theme(text = element_text(size = 14))
789+
theme(text = element_text(size = 12))
790790
791791
one_sample_dist
792792
```
@@ -813,7 +813,7 @@ boot1_dist <- ggplot(boot1, aes(price)) +
813813
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
814814
ylab("Count") +
815815
xlab("Price per night (Canadian dollars)") +
816-
theme(text = element_text(size = 14))
816+
theme(text = element_text(size = 12))
817817
818818
boot1_dist
819819
@@ -855,7 +855,7 @@ ggplot(six_bootstrap_samples, aes(price)) +
855855
xlab("Price per night (Canadian dollars)") +
856856
ylab("Count") +
857857
facet_wrap(~replicate) +
858-
theme(text = element_text(size = 14))
858+
theme(text = element_text(size = 12))
859859
```
860860

861861
We see in Figure \@ref(fig:11-bootstrapping-six-bootstrap-samples) how the
@@ -886,7 +886,7 @@ boot_est_dist <- ggplot(boot20000_means, aes(x = mean)) +
886886
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
887887
ylab("Count") +
888888
xlab("Sample mean price per night \n (Canadian dollars)") +
889-
theme(text = element_text(size = 14))
889+
theme(text = element_text(size = 12))
890890
891891
boot_est_dist
892892
```

regression2.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ print_tidymodels <- function(tidymodels_object) {
2525
}
2626
}
2727
28-
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
28+
theme_update(axis.title = element_text(size = 12)) # modify axis label size in plots
2929
```
3030

3131
## Overview
@@ -300,7 +300,7 @@ lm_plot_final <- ggplot(sacramento_train, aes(x = sqft, y = price)) +
300300
ylab("Price (USD)") +
301301
scale_y_continuous(labels = dollar_format()) +
302302
geom_smooth(method = "lm", se = FALSE) +
303-
theme(text = element_text(size = 14))
303+
theme(text = element_text(size = 12))
304304
305305
lm_plot_final
306306
```
@@ -371,7 +371,7 @@ knn_plot_final <- ggplot(sacr_preds, aes(x = sqft, y = price)) +
371371
geom_line(data = sacr_preds, aes(x = sqft, y = .pred), color = "blue") +
372372
ggtitle("KNN regression") +
373373
annotate("text", x = 3500, y = 100000, label = paste("RMSPE =", sacr_rmspe)) +
374-
theme(text = element_text(size = 14))
374+
theme(text = element_text(size = 12))
375375
376376
lm_rmspe <- lm_test_results |>
377377
filter(.metric == "rmse") |>
@@ -381,7 +381,7 @@ lm_rmspe <- lm_test_results |>
381381
lm_plot_final <- lm_plot_final +
382382
annotate("text", x = 3500, y = 100000, label = paste("RMSPE =", lm_rmspe)) +
383383
ggtitle("linear regression") +
384-
theme(text = element_text(size = 14))
384+
theme(text = element_text(size = 12))
385385
386386
grid.arrange(lm_plot_final, knn_plot_final, ncol = 2)
387387
```

0 commit comments

Comments
 (0)