Skip to content

bubble(circle) plot help.

1 message · Yihui Xie

#
I don't quite understand your R code (I think your random numbers make
the graph very hard to read!), but I have also written an example for
the interaction effect:

## 400 bubbles to show the interaction of x and z
sq = seq(0, 10, length = 20)
x = rep(sq, 20)
z = rep(sq, each = 20)
y = c(outer(sq, sq, function(x, z) 10 + 1 * x + 0.5 *
    z + 0.5 * x * z + runif(1)))
symbols(x, z, y, bg = rgb(1, 0, 0, 0.1), fg = "yellow")
## observe the bubbles from the x-axis or y-axis

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Thu, Sep 18, 2008 at 11:18 AM, Wen Gu <edwardg22486 at hotmail.com> wrote: