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

Lucas Dyer HW02 #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Lucas Dyer HW02 #24

wants to merge 5 commits into from

Conversation

ldyer451
Copy link

No description provided.

@@ -1,6 +1,6 @@
---
title: "What went wrong?"
author: "Robert Gruener"
author: "Lucas Dyer"

Choose a reason for hiding this comment

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

It's a good practice to keep a record of the author, which I did not notice in my HW.

ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, color = "blue"))

ggplot(data = mpg, aes(displ, hwy)) +

Choose a reason for hiding this comment

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

For me, I left the aes() function inside the geometries layer, but yeah, putting them inside ggplot() could be tidier.

@@ -42,6 +40,10 @@ data("diamonds")
Using the diamonds dataset, make this graph:
```{r graph1 code, echo=FALSE}

Choose a reason for hiding this comment

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

I would recommend changing "echo" to TRUE, so that codes will appear right above the graphs in the corresponding .md file, which makes it easier for others to review them!

Copy link
Author

Choose a reason for hiding this comment

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

Thank you! I couldn't really remember what that function did, so I just left it as I saw it in anothe example.

iris$Species2 <-factor(iris$Species, levels=c("versicolor", "setosa", "virginica"))
ggplot(iris, aes(Sepal.Length, Petal.Length))+
geom_point(aes(color=Species, shape=Species))+
facet_wrap(~Species2, scales = "free_y")+

Choose a reason for hiding this comment

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

Thanks, this line has been really helpful, since I did not know that the axes of faceted figures can be synced in only one dimension.

Choose a reason for hiding this comment

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

By the way, it might be a good idea to keep it coherent in how spaces are added, e.g., comparing to line 60, I would recommend "=" to be wrapped with spaces also in line 59.


scale_color_brewer(palette="Set2")+
scale_fill_brewer(palette="Set2")+
geom_dotplot(binaxis='y', dotsize=0.5, stackdir='center', aes( fill=class, color=class))+

Choose a reason for hiding this comment

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

This is an interesting implementation, which creates well-aligned dots in y-direction comparing to the random style using jittering.

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.

2 participants