@@ -16,6 +16,8 @@ knitr::opts_chunk$set(warning = FALSE, fig.align = "default")
16
16
# some graphs with the code shown to students are hard coded
17
17
cbbPalette <- c(brewer.pal(9, "Paired"))
18
18
cbpalette <- c("darkorange3", "dodgerblue3", "goldenrod1")
19
+
20
+ theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
19
21
```
20
22
21
23
## Overview
@@ -171,7 +173,8 @@ ggplot(data, aes(x = flipper_length_standardized,
171
173
y = bill_length_standardized)) +
172
174
geom_point() +
173
175
xlab("Flipper Length (standardized)") +
174
- ylab("Bill Length (standardized)")
176
+ ylab("Bill Length (standardized)") +
177
+ theme(text = element_text(size = 14))
175
178
```
176
179
177
180
Based \index{ggplot}\index{ggplot!geom\_ point} on the visualization
@@ -938,7 +941,8 @@ cluster_plot <- ggplot(clustered_data,
938
941
color = "Cluster") +
939
942
scale_color_manual(values = c("dodgerblue3",
940
943
"darkorange3",
941
- "goldenrod1"))
944
+ "goldenrod1")) +
945
+ theme(text = element_text(size = 14))
942
946
943
947
cluster_plot
944
948
```
@@ -1040,7 +1044,8 @@ elbow_plot <- ggplot(clustering_statistics, aes(x = k, y = tot.withinss)) +
1040
1044
geom_line() +
1041
1045
xlab("K") +
1042
1046
ylab("Total within-cluster sum of squares") +
1043
- scale_x_continuous(breaks = 1:9)
1047
+ scale_x_continuous(breaks = 1:9) +
1048
+ theme(text = element_text(size = 14))
1044
1049
1045
1050
elbow_plot
1046
1051
```
@@ -1082,7 +1087,8 @@ elbow_plot <- ggplot(clustering_statistics, aes(x = k, y = tot.withinss)) +
1082
1087
geom_line() +
1083
1088
xlab("K") +
1084
1089
ylab("Total within-cluster sum of squares") +
1085
- scale_x_continuous(breaks = 1:9)
1090
+ scale_x_continuous(breaks = 1:9) +
1091
+ theme(text = element_text(size = 14))
1086
1092
1087
1093
elbow_plot
1088
1094
```
0 commit comments