Perfect. Can't believe I failed to find that! Thanks, as ever, Rui
- Original Message -
> From: "Rui Barradas"
> To: "Chris Evans" , R-help@r-project.org
> Sent: Sunday, 10 January, 2021 18:10:16
> Subject: Re: [R] How to avoid ggplot clipping t
Hello,
You are almost there.
With scale_x_continuous use argument limits.
ggplot(dat = tibDat,
aes(x = x, y = y)) +
geom_point() +
scale_x_continuous(breaks = 1:6, labels = 1:6,
limits = c(1, 6))
And with xlim it's not a vector c(1, 6), it's each element on it
[I must try to remember that swapping between Rstudio and my Emailer is a
recipe for hitting ctrl-enter and posting prematurely: sorry!]
I am sure I am doing something stupid but I can't see what. I am plotting data
and want the x axis labels to reflect the theoretical range of the x variable
3 matches
Mail list logo