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

Suggestions #6

Open
KittJonathan opened this issue Jan 12, 2023 · 1 comment
Open

Suggestions #6

KittJonathan opened this issue Jan 12, 2023 · 1 comment

Comments

@KittJonathan
Copy link

Hi Cédric ! Hope you're doing well.

I'm working through your tutorial, and I've got a couple suggestions :

  • line 244 : geom_line(color = "firebrick", linetype = "dotted", size = .3) -> use linewidth instead of size
  • line 385 : you can adjust the position of the text afterwards horizontally (0 = left, 1 = right) and vertically (0 = top, 1 = bottom) -> not sure I understand the vjust ajustments here ... shouldn't it be 0 = bottom and 1 = top ?

All the best,

Jonathan.

@z3tt
Copy link
Owner

z3tt commented Jan 18, 2023

Hi Jonathan,

Thanks for the feedback! Yes, I should use linewidth here, also to be consistent.
With regard to the vertical adjustment: top is actually zero, test it with this tiny chart:

library(ggplot2)

g <- ggplot(mpg, aes(displ, hwy)) + geom_point() 

g + geom_text(aes(label = year), vjust = 0)  ## moves label above points
g + geom_text(aes(label = year), vjust = 1)  ## moves label below points

Best, Cédric

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

No branches or pull requests

2 participants