Wolfram Fischer - Z/I/M
2002-May-31 14:15 UTC
[R] plot() accepts arrays of cex and col, xyplot() does not
An inconsistancy:
n <- 6
x <- 1:n
y <- rnorm(1:n)
q <- ( x %% 3 + 1 ) * 2
plot( x, y, cex=q, col=q )
xyplot( x ~ y, cex=q, col=q )
While plot() draws different sizes and colors
xyplot() uses only one color and size.
Wolfram Fischer
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Renaud Lancelot
2002-May-31 18:47 UTC
[R] plot() accepts arrays of cex and col, xyplot() does not
plot and xyplot use different technologies and syntax. For instance,
there is a typo in your code below: you meant xyplot(y ~ x, cex = q, col
= q) instead of xyplot(x ~ y, cex = q, col = q).
If you want to reproduce your example with xyplot:
xyplot( y ~ x, groups = x,
panel = function(x, y,...){
panel.superpose(x, y, cex=q, col=q,... )
})
Best,
Renaud
Wolfram Fischer - Z/I/M wrote:>
> An inconsistancy:
>
> n <- 6
> x <- 1:n
> y <- rnorm(1:n)
> q <- ( x %% 3 + 1 ) * 2
> plot( x, y, cex=q, col=q )
> xyplot( x ~ y, cex=q, col=q )
>
> While plot() draws different sizes and colors
> xyplot() uses only one color and size.
>
> Wolfram Fischer
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
Dr Renaud Lancelot, v?t?rinaire
CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt)
Programme Productions Animales
http://www.cirad.fr/presentation/programmes/prod-ani.shtml (Fran?ais)
http://www.cirad.fr/presentation/en/program-eng/prod-ani.shtml (English)
ISRA-LNERV tel (221) 832 49 02
BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD)
Senegal e-mail renaud.lancelot at cirad.fr
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._