[R] curves with shaded areas?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jul 22 13:18:27 CEST 2003
On Tue, 22 Jul 2003, Johannes Fuernkranz wrote:
> Prof Brian Ripley wrote:
>
> > See ?polygon, ?rect for how to shade areas.
>
> Thank you.
> This covers most but not all of my problems. :-)
>
> > If you make a plot with abline, surely it has no curves (only straight
> > lines)?
>
> Right, sorry. I was a bit over-simplifying my problem, because I thought
> this can be done with a general plot parameter (something like lty), and
> most of the graphs I am plotting are actually straight regression lines.
>
> The tougher cases are those wher I want to shade the area inside /
> outside a specific contour line (produced with 'contour'). Can this be
> done as well?
?filled.contour with a single contour may help. Otherwise I think you
need the clines package (from Paul Murrell,
http://www.stat.auckland.ac.nz/~paul/) and use polygon on its output.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list