[R] Zooming in to a ggplot (a sort of ylim, but ylim won't do)

Ben Bolker bbolker at gmail.com
Tue Nov 30 13:34:10 CET 2010

Frost Andy <andy.frost2 <at> ntlworld.com> writes:

> I wonder whether you might be able to help me. I have a plot composed of
> ggplot (and a follow on geom_smooth call). I would like to restrict the
> display range of the y axis to a smaller range, a sort of zooming onto a
> region. I attempted to use ylim, but it will effect the range (i.e. effect
> the geom_smooth call). Is there any way that I can save the results up to
> geom_smooth call and then restrict the print region. See the example code
> below.


  There is an active google group for ggplot
<http://groups.google.com/group/ggplot2> that is probably better than R-help for
ggplot-specific questions.

  Ben Bolker

More information about the R-help mailing list