[R] Drawing circles on a chart

Santosh Srinivas santosh.srinivas at gmail.com
Wed Nov 3 03:07:40 CET 2010


Dear Group,
I have the following data matrix which is a timeseries. 

> dput(tData)
structure(list(A = c(0.2, 0.13, 0.05, 0.1, 0.02, 0.18, 0.09, 
0.06, 0.13), B = c(0.15, 0.06, 0.09, 0.02, 0.03, 0.12, 0.01, 
0.15, 0.06), C = c(-0.1, 0, -0.07, -0.06, -0.05, -0.05, -0.06, 
-0.08, -0.07), D = c(-0.15, -0.05, -0.1, -0.03, -0.13, -0.04, 
-0.1, -0.04, -0.15), E = c(-0.17, -0.16, -0.08, -0.07, -0.09, 
-0.14, -0.1, -0.05, 0)), .Names = c("A", "B", "C", "D", "E"), class =
"data.frame", row.names = c(NA, 
-9L))


I am trying to display this data in a graphic. The values vary from -0.2 to
+0.2
There should be a table with 5 Rows and 9 Columns. Rows labeled A to E and
Columns labeled 1 to 9.
Inside each cell there should be a circle (sphere preferable) with radius of
mod(data value). The color should be either red or green depending on -ve or
+ve and the intensity should be based on the value of the datapoint.

Any help on how to go about this?

Thanks,
S



More information about the R-help mailing list