Re: [R] Label Values in levelplot

From: Felix Andrews <felix_at_nfrac.org>
Date: Mon, 28 Jun 2010 09:32:46 +1000

something like
panel = function(x, y, z, ...) {

    panel.levelplot(x, y, z, ...)
    panel.text(x, y, labels = z)
}

(if you have multiple panels you will need to use 'subscripts' too)

On 25 June 2010 13:16, Ben Wilkinson <bjlwilkinson_at_gmail.com> wrote:
> I am trying to add labels equal to the value in a levelplot. I believe that
> panel may be the way to go but cannot understand the examples.
>
> In the following example:
>
> X,Y,Z
> A,M,100
> A,M,200
> B,N,150
> B,N,225
>
> I would like to label each of the rectangles 100,200,150 and 225 and colour
> according to the value
>
> The colouring is achieved by
>
> levelplot(z ~ x *y , data) but then I get stuck with the labels
>
> Thanks
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Felix Andrews / 安福立
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 4670
E: felix.andrews_at_anu.edu.au
CRICOS Provider No. 00120C
-- 
http://www.neurofractal.org/felix/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 27 Jun 2010 - 23:35:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jun 2010 - 00:40:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive