Some more x and y
This commit is contained in:
parent
e19dd4c63f
commit
b9a21fd23f
|
@ -256,7 +256,7 @@ flights |>
|
|||
group_by(hour = sched_dep_time %/% 100) |>
|
||||
summarize(prop_cancelled = mean(is.na(dep_time)), n = n()) |>
|
||||
filter(hour > 1) |>
|
||||
ggplot(aes(hour, prop_cancelled)) +
|
||||
ggplot(aes(x = hour, y = prop_cancelled)) +
|
||||
geom_line(color = "grey50") +
|
||||
geom_point(aes(size = n))
|
||||
```
|
||||
|
@ -281,14 +281,14 @@ money <- tibble(
|
|||
If you plot this data, you'll get an exponential curve showing how your money grows year by year at an interest rate of 1.05:
|
||||
|
||||
```{r}
|
||||
ggplot(money, aes(year, money)) +
|
||||
ggplot(money, aes(x = year, y = money)) +
|
||||
geom_line()
|
||||
```
|
||||
|
||||
Log transforming the y-axis gives a straight line:
|
||||
|
||||
```{r}
|
||||
ggplot(money, aes(year, money)) +
|
||||
ggplot(money, aes(x = year, y = money)) +
|
||||
geom_line() +
|
||||
scale_y_log10()
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue