If you specify the axis limits in ggplot, the deleted points are deleted. This is good for points, but you may need to build lines that intersect with the specified range, but the ggplot range or xlim/ylim remove these. Is there any other way to specify the range of the axis of the graph without deleting external data?
eg.
require(ggplot2) d = data.frame(x=c(1,4,7,2,9,7), y=c(2,5,4,10,5,3), grp=c('a','a','b','b','c','c')) ggplot(d, aes(x, y, group=grp)) + geom_line() ggplot(d, aes(x, y, group=grp)) + geom_line() + scale_y_continuous(limits=c(0,7)) ggplot(d, aes(x, y, group=grp)) + geom_line() + ylim(0,7)
r limits ggplot2 zoom
geotheory Sep 05 '14 at 11:45 2014-09-05 11:45
source share