> Hello everybody,
>
> Using ggplot2 package, is there a way to force to stop the y-axis line
> at a specified point ? (not using ylim because I want that some text
> written using annotate() at the top of the graph is
> still shown).
>
> Bellow is a simple example to show
Hi
Here are some alternatives that involve messing about with the grobs and
viewports after the plot has been drawn. The percentage optimality of
these solutions is up for debate ...
###
# Edit the y-axis line after
After many tries, here is a solution using grob.
I post here in case it could help someone.
Note that this solution is not 100% optimal as it uses a trick (limits =
c(-0.05, 1.02)) to show fully the points.
Marc
library("ggplot2"); require("gtable"); require("grid")
p <- ggplot()+
Hello everybody,
Using ggplot2 package, is there a way to force to stop the y-axis line
at a specified point ? (not using ylim because I want that some text
written using annotate() at the top of the graph is still shown).
Bellow is a simple example to show what I would like do:
Thanks a
4 matches
Mail list logo