Skip to content

Commit f72ee96

Browse files
committed
updating plot font sizes for inference
1 parent 49eaecc commit f72ee96

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

inference.Rmd

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ min_x <- function(dist) {
2020
ggp_data <- ggplot_build(dist)
2121
min(ggp_data$data[[1]]$xmin)
2222
}
23+
24+
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
2325
```
2426

2527
## Overview
@@ -291,7 +293,8 @@ sampling distribution directly for learning purposes.
291293
sampling_distribution <- ggplot(sample_estimates, aes(x = sample_proportion)) +
292294
geom_histogram(fill = "dodgerblue3", color = "lightgrey", bins = 12) +
293295
ylab("Count") +
294-
xlab("Sample proportions")
296+
xlab("Sample proportions") +
297+
theme(text = element_text(size = 14))
295298
296299
sampling_distribution
297300
```
@@ -339,7 +342,8 @@ options(pillar.sigfig = 5)
339342
population_distribution <- ggplot(airbnb, aes(x = price)) +
340343
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
341344
ylab("Count") +
342-
xlab("Price per night (Canadian dollars)")
345+
xlab("Price per night (Canadian dollars)") +
346+
theme(text = element_text(size = 14))
343347
344348
population_distribution
345349
```
@@ -384,7 +388,8 @@ of our sample.
384388
sample_distribution <- ggplot(one_sample, aes(price)) +
385389
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
386390
ylab("Count") +
387-
xlab("Price per night (Canadian dollars)")
391+
xlab("Price per night (Canadian dollars)") +
392+
theme(text = element_text(size = 14))
388393
389394
sample_distribution
390395
@@ -432,7 +437,8 @@ sample_estimates
432437
sampling_distribution_40 <- ggplot(sample_estimates, aes(x = sample_mean)) +
433438
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
434439
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))
436442
437443
sampling_distribution_40
438444
```
@@ -779,7 +785,8 @@ one_sample
779785
one_sample_dist <- ggplot(one_sample, aes(price)) +
780786
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
781787
ylab("Count") +
782-
xlab("Price per night (Canadian dollars)")
788+
xlab("Price per night (Canadian dollars)") +
789+
theme(text = element_text(size = 14))
783790
784791
one_sample_dist
785792
```
@@ -805,7 +812,8 @@ boot1 <- one_sample |>
805812
boot1_dist <- ggplot(boot1, aes(price)) +
806813
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
807814
ylab("Count") +
808-
xlab("Price per night (Canadian dollars)")
815+
xlab("Price per night (Canadian dollars)") +
816+
theme(text = element_text(size = 14))
809817
810818
boot1_dist
811819
@@ -846,7 +854,8 @@ ggplot(six_bootstrap_samples, aes(price)) +
846854
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
847855
xlab("Price per night (Canadian dollars)") +
848856
ylab("Count") +
849-
facet_wrap(~replicate)
857+
facet_wrap(~replicate) +
858+
theme(text = element_text(size = 14))
850859
```
851860

852861
We see in Figure \@ref(fig:11-bootstrapping-six-bootstrap-samples) how the
@@ -876,7 +885,8 @@ tail(boot20000_means)
876885
boot_est_dist <- ggplot(boot20000_means, aes(x = mean)) +
877886
geom_histogram(fill = "dodgerblue3", color = "lightgrey") +
878887
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))
880890
881891
boot_est_dist
882892
```

0 commit comments

Comments
 (0)