-
Notifications
You must be signed in to change notification settings - Fork 46
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
Ben Wang Homework 2 #31
base: master
Are you sure you want to change the base?
Conversation
|
||
``` | ||
### Alpha does not change the size, it changes the opacity (0 is transparent, 1 is opaque). We change 'alpha' to 'size' to set size | ||
### Experimented with different coordinates until I got the legend where I wanted it | ||
### Removing legend title wouldn't let us use "none" so "element_blank" worked instead. To completely hide the legend, I could give it a position not seen in the graph (legend.position = c(10000,10000)) or use "none". |
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 interesting, will there be any differences in running time between the two options?
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.
I didn't think of that! Using such large position may cause a longer time running or crash the program. Alternatively, if the program tries to fit everything into one space, perhaps it'll scale the the entire figure really small to accommodate for the huge distance between the figure and legend. Maybe using a different coordinate is not the best option
geom_boxplot() + | ||
theme(axis.text.x = element_text(angle = 45)) | ||
theme(axis.text.x = element_text(angle = 45, hjust = 1)) |
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.
Using "hjust" is a good choice! I didn't realize I could use this command to adjust the distance so I just changed the angle to avoid overlapping lol
No description provided.