diff --git a/numbers.qmd b/numbers.qmd index 1cb3c62..1fee232 100644 --- a/numbers.qmd +++ b/numbers.qmd @@ -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() ```