Skip to content

Commit de85809

Browse files
committed
increasing font size of regression1
1 parent ce4579c commit de85809

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

regression1.Rmd

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ print_tidymodels <- function(tidymodels_object) {
2424
}
2525
}
2626
}
27+
theme_update(axis.title = element_text(size = 14)) # modify axis label size in plots
2728
```
2829

2930
## Overview
@@ -148,7 +149,8 @@ eda <- ggplot(sacramento, aes(x = sqft, y = price)) +
148149
geom_point(alpha = 0.4) +
149150
xlab("House size (square feet)") +
150151
ylab("Price (USD)") +
151-
scale_y_continuous(labels = dollar_format())
152+
scale_y_continuous(labels = dollar_format()) +
153+
theme(text = element_text(size = 14))
152154
153155
eda
154156
```
@@ -203,7 +205,8 @@ small_plot <- ggplot(small_sacramento, aes(x = sqft, y = price)) +
203205
xlab("House size (square feet)") +
204206
ylab("Price (USD)") +
205207
scale_y_continuous(labels = dollar_format()) +
206-
geom_vline(xintercept = 2000, linetype = "dotted")
208+
geom_vline(xintercept = 2000, linetype = "dotted") +
209+
theme(text = element_text(size = 14))
207210
208211
small_plot
209212
```
@@ -657,7 +660,8 @@ plot_final <- ggplot(sacramento_train, aes(x = sqft, y = price)) +
657660
xlab("House size (square feet)") +
658661
ylab("Price (USD)") +
659662
scale_y_continuous(labels = dollar_format()) +
660-
ggtitle(paste0("K = ", kmin))
663+
ggtitle(paste0("K = ", kmin)) +
664+
theme(text = element_text(size = 14))
661665
662666
plot_final
663667
```
@@ -691,9 +695,11 @@ to help predict the sale price of a house.
691695

692696
```{r 07-bedscatter, fig.height = 3.5, fig.width = 4.5, fig.cap = "Scatter plot of the sale price of houses versus the number of bedrooms."}
693697
plot_beds <- sacramento |>
694-
ggplot(aes(x = beds, y = price)) +
695-
geom_point(alpha = 0.4) +
696-
labs(x = 'Number of Bedrooms', y = 'Price (USD)')
698+
ggplot(aes(x = beds, y = price)) +
699+
geom_point(alpha = 0.4) +
700+
labs(x = 'Number of Bedrooms', y = 'Price (USD)') +
701+
theme(text = element_text(size = 14))
702+
697703
plot_beds
698704
```
699705

0 commit comments

Comments
 (0)