adiamond@fas.harvard.edu
2003-Jul-27 06:50 UTC
[R] contourplot:how to get it to label all contours like 'contour'
Hi, one of the nice things about contour is that it labels all contour lines. contourplot only labels each particular elevation a single time. i.e., if there are two contour lines corresponding to z = 45, it will only label one of them. is there a way to get contourplot to automatically label all the contour lines, even those that are repeated? i ask because i want to plot contour plots *w/ all contours labelled*, next to wireframe plots-- i can plot two lattice plots (wireframe and contourplot) next to each other easily enough, but contourplot doesn't label all contours. AND, i can get contour to label all of 'em, but then i don't know how to put an 'Old Style' contour plot alongside the lattice wireframe. mfrow doesn't work for wireframe, & i can't "print" plots generated by contour. any help is much appreciated. best, alexis
Prof Brian Ripley
2003-Jul-27 07:30 UTC
[R] contourplot:how to get it to label all contours like 'contour'
On Sun, 27 Jul 2003 adiamond at fas.harvard.edu wrote:> Hi, > > one of the nice things about contour is that it labels all contour lines. > contourplot only labels each particular elevation a single time. > i.e., if there are two contour lines corresponding to z = 45, it will only > label one of them. > > is there a way to get contourplot to automatically label all the contour lines, > even those that are repeated? > > i ask because i want to plot contour plots *w/ all contours labelled*, next to > wireframe plots-- i can plot two lattice plots (wireframe and contourplot) > next to each other easily enough, but contourplot doesn't label all contours. > > AND, i can get contour to label all of 'em, but then i don't know how to put > an 'Old Style' contour plot alongside the lattice wireframe. > mfrow doesn't work for wireframe, & i can't "print" plots generated by contour.What are you doing with the plot? If including in a document, it is should be easy to include them as two subfigures (it is LaTeX). If you want to do this on one on-screen device it isn't actually that hard: use print.trellis() to put the wireframe() one where you want it, and use par(fin) to select a figure region and call contour() within that. I've done that sort of thing several times when I wanted overlapping figure regions, usually because wireframe() gave too large margins. -- 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
Seemingly Similar Threads
- : (Lattice): Overlaying more than one trend surface using contourplot() and wireframe()
- Clip a contour with shapefile while using contourplot
- Overlaying trellis xyplot on contourplot
- how do I eliminate excess levels in lattice contourplot key / legend?
- vectors on top of contours, and lattice