Description Usage Arguments Value Author(s) Examples
hexagonPT
plots a pointy topped hexagon.
hexagonMap
plots a map of hexagons.
1 2 3 4 5 |
x, y |
hexagon center coordinates. |
col |
the color for filling the polygon. The default,
|
border |
the color to draw the border. The default, For compatibility with S, |
r |
radius of circle inscribed in hexagon. Default value is 0.5. |
l |
distance from the center to the upper/lower vertices of hexagon. |
add |
logical. If |
... |
graphical parameters such as |
Plotted hexagon
Vilmantas Gegzna
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data <- class::somgrid(8,6,"hexagonal")$pts
head(data)
x <- data[,"x"]
y <- data[,"y"]
hexagonMap(x, y)
hexagonMap(x, y, col = "yellow")
hexagonMap(x, y,
col = c("tomato1","skyblue","orange"),
border = c("red", "black"))
text(x,y,1:length(x))
title("Hexagonal cells \n with cell ID number")
#====================================================================
plot.new()
hexagonPT(.5,.5, r = .25)
#====================================================================
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.