Re: [R] Limit the y-axis line with ggplot2 (not the axis itself, but the line used at the left of the graph)

2016-10-25 Thread Zach Simpson
> 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

Re: [R] Limit the y-axis line with ggplot2 (not the axis itself, but the line used at the left of the graph) [SOLVED]

2016-10-25 Thread Paul Murrell
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

Re: [R] Limit the y-axis line with ggplot2 (not the axis itself, but the line used at the left of the graph) [SOLVED]

2016-10-25 Thread Marc Girondot
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()+

[R] Limit the y-axis line with ggplot2 (not the axis itself, but the line used at the left of the graph)

2016-10-24 Thread Marc Girondot via R-help
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