@@ -20,6 +20,8 @@ min_x <- function(dist) {
20
20
ggp_data <- ggplot_build(dist)
21
21
min(ggp_data$data[[1]]$xmin)
22
22
}
23
+
24
+ theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
23
25
```
24
26
25
27
## Overview
@@ -291,7 +293,8 @@ sampling distribution directly for learning purposes.
291
293
sampling_distribution <- ggplot(sample_estimates, aes(x = sample_proportion)) +
292
294
geom_histogram(fill = "dodgerblue3", color = "lightgrey", bins = 12) +
293
295
ylab("Count") +
294
- xlab("Sample proportions")
296
+ xlab("Sample proportions") +
297
+ theme(text = element_text(size = 14))
295
298
296
299
sampling_distribution
297
300
```
@@ -339,7 +342,8 @@ options(pillar.sigfig = 5)
339
342
population_distribution <- ggplot(airbnb, aes(x = price)) +
340
343
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
341
344
ylab("Count") +
342
- xlab("Price per night (Canadian dollars)")
345
+ xlab("Price per night (Canadian dollars)") +
346
+ theme(text = element_text(size = 14))
343
347
344
348
population_distribution
345
349
```
@@ -384,7 +388,8 @@ of our sample.
384
388
sample_distribution <- ggplot(one_sample, aes(price)) +
385
389
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
386
390
ylab("Count") +
387
- xlab("Price per night (Canadian dollars)")
391
+ xlab("Price per night (Canadian dollars)") +
392
+ theme(text = element_text(size = 14))
388
393
389
394
sample_distribution
390
395
@@ -432,7 +437,8 @@ sample_estimates
432
437
sampling_distribution_40 <- ggplot(sample_estimates, aes(x = sample_mean)) +
433
438
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
434
439
ylab("Count") +
435
- xlab("Sample mean price per night (Canadian dollars)")
440
+ xlab("Sample mean price per night (Canadian dollars)") +
441
+ theme(text = element_text(size = 14))
436
442
437
443
sampling_distribution_40
438
444
```
@@ -779,7 +785,8 @@ one_sample
779
785
one_sample_dist <- ggplot(one_sample, aes(price)) +
780
786
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
781
787
ylab("Count") +
782
- xlab("Price per night (Canadian dollars)")
788
+ xlab("Price per night (Canadian dollars)") +
789
+ theme(text = element_text(size = 14))
783
790
784
791
one_sample_dist
785
792
```
@@ -805,7 +812,8 @@ boot1 <- one_sample |>
805
812
boot1_dist <- ggplot(boot1, aes(price)) +
806
813
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
807
814
ylab("Count") +
808
- xlab("Price per night (Canadian dollars)")
815
+ xlab("Price per night (Canadian dollars)") +
816
+ theme(text = element_text(size = 14))
809
817
810
818
boot1_dist
811
819
@@ -846,7 +854,8 @@ ggplot(six_bootstrap_samples, aes(price)) +
846
854
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
847
855
xlab("Price per night (Canadian dollars)") +
848
856
ylab("Count") +
849
- facet_wrap(~replicate)
857
+ facet_wrap(~replicate) +
858
+ theme(text = element_text(size = 14))
850
859
```
851
860
852
861
We see in Figure \@ ref(fig:11-bootstrapping-six-bootstrap-samples) how the
@@ -876,7 +885,8 @@ tail(boot20000_means)
876
885
boot_est_dist <- ggplot(boot20000_means, aes(x = mean)) +
877
886
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
878
887
ylab("Count") +
879
- xlab("Sample mean price per night \n (Canadian dollars)")
888
+ xlab("Sample mean price per night \n (Canadian dollars)") +
889
+ theme(text = element_text(size = 14))
880
890
881
891
boot_est_dist
882
892
```
0 commit comments