Examples for 'snippets::add.layout'


Functions designed to create non-overlaping layout of rectangles or labels.

Aliases: add.layout add.labels

Keywords: dplot

### ** Examples

x = rnorm(100)
y = rnorm(100)
txt = sprintf("%.2f", rnorm(100))
plot(x, y, pch=3, col=2)
l = add.labels(x, y, txt, mar=0.2)
rect(l$x, l$y, l$x + l$w, l$y + l$h, col="#00000020", border=NA)
text(l$lx, l$ly, txt, col=4)
segments(x, y, l$lx, l$ly, col=3)
plot of chunk example-snippets-add.layout-1

[Package snippets version 0.1-3 Index]