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

Ben Wang Homework 2 #31

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

Conversation

Blwang3
Copy link

@Blwang3 Blwang3 commented Jul 14, 2020

No description provided.


```
### 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".

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?

Copy link
Author

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

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

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