-
Notifications
You must be signed in to change notification settings - Fork 6
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
Legend removal in data viz #542
Conversation
geom_line(size = 0.8) | ||
``` | ||
|
||
## Removing the legend label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change (there's weird spacing that showed up in the diff so I'm just going to point out the "real" changes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
@@ -153,7 +153,7 @@ facet_plot <- ggplot(bike_agg_2, mapping = aes( | |||
facet_plot | |||
``` | |||
|
|||
**Bonus / Extra practice**: Modify `facet_plot` to remove the legend (hint use `theme()`) and change the names of the axis titles to be "Number of bike lanes" for the y axis and "Date bike lane was installed" for the x axis. | |||
**Bonus / Extra practice**: Modify `facet_plot` to remove the legend (hint use `theme()` and the `legend.position` argument) and change the names of the axis titles to be "Number of bike lanes" for the y axis and "Date bike lane was installed" for the x axis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it in the key as well. Sometime I should help you automate the notebook solution -> no solution creation. I have answers removed automatically and for datatrail project notebook solutions. (but this can be done at a later time).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great! although we add extra alternatives though...so that would be different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, this is definitely on the list :)
@@ -131,7 +131,7 @@ Assign the new plot as an object called `facet_plot`. | |||
|
|||
``` | |||
|
|||
**Bonus / Extra practice**: Modify `facet_plot` to remove the legend and change the names of the axis titles to be "Number of bike lanes" for the y axis and "Date bike lane was installed" for the x axis. | |||
**Bonus / Extra practice**: Modify `facet_plot` to remove the legend (hint use `theme()` and the `legend.position` argument) and change the names of the axis titles to be "Number of bike lanes" for the y axis and "Date bike lane was installed" for the x axis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change. Added an extra hint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
No spelling errors! 🎉 |
Re-rendered previews from the latest commit: See preview of website here Updated at 2024-03-20 with changes from 9d8e312 |
No broken URLs detected! 🎉 |
Looks good - don't need to add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go, just remove the html file changes!
No broken url errors! 🎉 |
Thanks so much for this @cansavvy ! I made the final changes and will go ahead and merge this. |
Summary
This should address #523 by adding in a new slide that shows how to remove legends and also adding in extra hint in the lab about how you do this.
Before I file more PRs for other issues, wanna make sure I am contributing properly. Do I have to do manual rendering? Or should I push the manual files? I will look in the GitHub workflows folder to see if I can have a better idea of whats done automatically.