[R] Lattice dotplot with symbols sized and colored

From: David Kidd <dmk2_at_st-andrews.ac.uk>
Date: Tue 03 May 2005 - 20:08:10 EST

Apologies if this is a naive beginners question.

I am trying to create a dotplot with the lattice dotplot function in which my dots are colored differently depending on if positive or negative and sized by sp.nc.bdrs.data$mwZ

I have tried...

dotplot(sporder ~ cvarorder | direct, data=sp.nc.bdrs.data, cex=abs(sp.nc.bdrs.data$mwZ * 0.05),
xlab="climate variables",
ylab="species",col= sp.nc.bdrs.data$mysign, scales = list(y = list(labels = as.character(spname),at = 1:12, cex = 0.5), x = list(labels = as.character(my.ylabel), at = 1:66, rot=90, cex = 0.5), alternating = 3))

This sizes my symbols correctly but colors all four conditional plots (direct = 'e', 'n', 's' & 'w') using the colors defined for the first direct condition (i.e. 'e').

I have also tried using 'groups' to set the colors, however, whenever I do this I cannot get cex to then size the symbols - I get open circles that do not scale. This problem also happens when I try setting up a panel function.

Many Thanks

David M. Kidd
Research Assistant
School of Biology
Room 210, Sir Harold Mitchell Building
University of St. Andrews
St. Andrews, Fife
KY16 9TH
http://www.st-and.ac.uk/~bugs/dave/dave.htm Tel: +44 (0)1334 463348
Fax: +44 (0)1334 463600

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 03 20:20:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:32 EST