Description Usage Arguments Author(s) Examples
Plotting a square
1 2 | make_square(center = c(0, 0), side = 2, col = "darkblue",
fill = NULL, lty = 1)
|
center |
A |
side |
A |
col |
A |
fill |
A |
lty |
A |
Stephane Guerrier
1 2 3 4 5 6 7 8 9 | cols = hcl(h = seq(15, 375, length = 4), l = 65, c = 100)[1:3]
cols_trans = hcl(h = seq(15, 375, length = 4), l = 65, c = 100, alpha = 0.15)[1:3]
plot(NA, xlim = c(-110, 110), ylim = c(-110, 110), xlab = "x", ylab = "y")
grid()
make_square(center = c(-50,50), side = 100, col = cols[1], lty = 4)
make_square(center = c(0,0), side = 100, col = cols[2], fill = cols_trans[2], lty = 2)
make_square(center = c(50,-50), side = 100, col = cols_trans[3], fill = cols_trans[3])
make_square(center = c(50,-50), side = 100, col = cols[1], fill = cols_trans[3])
make_square(center = c(0,0), side = 150, col = cols_trans[1], fill = cols_trans[1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.