Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong axis order in Exercise 3.2.5 #594

Open
persep opened this issue Feb 24, 2021 · 0 comments
Open

Wrong axis order in Exercise 3.2.5 #594

persep opened this issue Feb 24, 2021 · 0 comments

Comments

@persep
Copy link

persep commented Feb 24, 2021

Exercise 3.2.5 on page https://jrnold.github.io/r4ds-exercise-solutions/data-visualisation.html asks

What happens if you make a scatter plot of class vs drv? Why is the plot not useful?

The proposed solution you give to make the plot is:

ggplot(mpg, aes(x = class, y = drv)) +
  geom_point()

But the correct solution is to plot the axis as "y-axis variable vs. x-axis variable." so it should be:

ggplot(mpg, aes(x = drv, y = class)) +
  geom_point()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant