Re: [R] Data labels in barchart (lattice)

From: K. Elo <maillists_at_nic.fi>
Date: Mon, 21 Apr 2008 21:33:53 +0300

Hi again,

Deepayan Sarkar wrote (21.4.2008):
> Write your own panel function (which may or may not be a simple
> exercise depending on your level of expertise in R). You could use
> panel.barchart as a starting point. Basically, you need to insert
> some calls to panel.text() (or something equivalent) after calls to
> panel.rect() that draw the bars.

Thanks to Deepayan for his quick answer. Well, I am quite familiar with R programming, so programming would not be the issue. What is an issue is that I do not (yet) fully understand how the panel-function interacts with the calling barchart-function (or vice versa). My stacked bar is build of five variables [barchart(ID ~ L1+L2+L3+L4+DN ...) ] so the problem is that the data label to be displayed is either L1,2,3,4 or DN (for ID, see my first posting).

So the question is: How could I use the current data value used for drawing the "sub-bar" as an argument/variable for/in the panel-function?

Many thanks again & greetings,
Kimmo



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 Mon 21 Apr 2008 - 18:55:47 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 21 Apr 2008 - 19:30:30 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