drosofff
12/25/2016 - 10:24 PM

## 4 circles of various areas in a square panel

4 circles of various areas in a square panel

``````# note that the background is not defined in this work
# could be done using par(bg=/colour reference/)

x=sort(abs(rnorm (100, 0,1) ), decreasing=T )
x=x/x[1]
symbols(c(rep(1,25),rep(2,25),rep(1,25),rep(2,25)), c(rep(1,50),rep(2,50) ),
circles = x, bg = colors()[abs(rnorm(256,100,15))], inches = FALSE,
fg=colors()[abs(rnorm(256,100,15))], xaxt='n', yaxt='n',ann=FALSE)

# then with x defined as above this works also:
par(bg=colors()[281])
symbols(c(rep(1,25),rep(2,25),rep(1,25),rep(2,25)), c(rep(1,50),rep(2,50) ),
circles = x, bg = colors()[abs(rnorm(256,100,15))], inches = FALSE,
fg=colors()[abs(rnorm(256,100,15))], xaxt='n', yaxt='n',ann=FALSE,
xlim=c(0,2.5), ylim=c(-0.2,2.5))

``````
``````## circles / bubbles
x=sort(abs(rnorm (100, 0,1) ), decreasing=T )
x=x/x[1]
symbols(rnorm(100,1,1), rnorm(100,1,1), circles = x,
bg=colors()[abs(rnorm(256,100,15))], inches = FALSE,
fg=colors()[abs(rnorm(256,100,15))], xaxt='n', yaxt='n',
ann=FALSE, xlim=c(0,2.5), ylim=c(-0.2,2.5))

## interesting bubble effect to keep in mind for medusa
> x=sort(abs(rnorm (500, 0,1) ), decreasing=T ) # the sorting for the effect
> symbols(rnorm(500,3,1), rnorm(500,3,1), circles = x/10,
bg = colors()[abs(rnorm(100,150,50))], inches = FALSE,
fg=colors()[abs(rnorm(100,150,50))], xaxt='n', yaxt='n',ann=FALSE)
``````
``````colorvector=colors()[51:150]
symbols(rnorm(5000,100,100), rnorm(5000,100,100),
circles = rchisq(5000,1, df=3), bg = colorvector, fg=colorvector,
inches = FALSE, xaxt='n', yaxt='n', add=FALSE)
``````