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

Legend removal in data viz #542

Merged
merged 6 commits into from
Mar 20, 2024
Merged

Legend removal in data viz #542

merged 6 commits into from
Mar 20, 2024

Conversation

cansavvy
Copy link
Contributor

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.

geom_line(size = 0.8)
```

## Removing the legend label
Copy link
Contributor Author

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).

Copy link
Member

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.
Copy link
Contributor Author

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).

Copy link
Member

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

Copy link
Collaborator

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.
Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

github-actions bot commented Mar 13, 2024

No spelling errors! 🎉
Comment updated at 2024-03-20-02:52:57 with changes from 9d8e312

Copy link
Contributor

github-actions bot commented Mar 13, 2024

Re-rendered previews from the latest commit: See preview of website here

Updated at 2024-03-20 with changes from 9d8e312

Copy link
Contributor

No broken URLs detected! 🎉
Comment updated at 2024-03-13 with changes from 7618a3c

@carriewright11
Copy link
Member

Looks good - don't need to add the html files - it will automatically render it

Copy link
Collaborator

@avahoffman avahoffman left a 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!

Copy link
Contributor

github-actions bot commented Mar 16, 2024

No broken url errors! 🎉
Comment updated at 2024-03-20-02:52:59 with changes from 9d8e312

@avahoffman avahoffman linked an issue Mar 20, 2024 that may be closed by this pull request
@avahoffman
Copy link
Collaborator

Thanks so much for this @cansavvy ! I made the final changes and will go ahead and merge this.

@avahoffman avahoffman merged commit a6c8269 into main Mar 20, 2024
8 checks passed
@avahoffman avahoffman deleted the cansavvy/edits branch March 20, 2024 02:58
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

Successfully merging this pull request may close these issues.

change the legend removal slide to be for a colored boxplot
3 participants