Hello community,
I would like to have a Yaxis of (0,100), but I would like my Ylim to be 120. (I want to introduce text in this space).
Summarizing : I want to stop my Yaxis before the top of the image.
How can I satisfy those two conditions ?
Edit : I already tried to search the Internet before taking the time of someone else.
Thanks !
Benjamin
Could you elaborate a little more in your question? ideally, could you ask this with a minimal REPRoducible EXample (reprex)?
If I'm understanding you correctly I think you can get what you want quite easily by using ggplot2
library(ggplot2)
set.seed(1)
df <- data.frame(x = sample(1:100, 10),
y = sample(1:100, 10))
ggplot(df, aes(x, y)) +
geom_point() +
scale_y_continuous(limits = c(0, 100)) +
labs(title = "Sample Plot",
subtitle = "Here you can write all the text you want\nwithout interfering with the y-axis")
Created on 2019-10-02 by the reprex package (v0.3.0.9000)