Skip to content
Back to formatted view

Raw Message

Message-ID: <DNEELNJCLGBOLHCFLMHBMENMCHAA.OLPantani@unifi.it>
Date: 2004-11-05T11:05:41Z
From: 8rino-Luca Pantani
Subject: I: a coloured band within each panel of a lattice bwplot

Hi all,
I would like to add to each panel of a bwplot a coloured central band,
centered on the mean of the values, being its width +- 2% of the mean
itself.

I know how to add lines, i.e. something like

bwplot(X ~ Y|FACTOR
       data=my.df,
       panel= function(x, y){
         panel.bwplot(x, y)
         panel.abline(v = mean(x, na.rm = T) - mean(x, na.rm = T) * 0.02
         panel.abline(v = mean(x, na.rm = T) + mean(x, na.rm = T) * 0.02
       })

but I cannot figure out how to shade the region included between the two
lines.

Is it possible, or I'm pretending too much?

Thanks to all.

Ottorino-Luca Pantani, Universit?? di Firenze
Dip. Scienza del Suolo e Nutrizione della Pianta