Learn R Programming

recmap (version 1.0.17)

.get_7triangles: construct polygon mesh displayed in Figure 4a in

Description

construct polygon mesh displayed in Figure 4a in

Usage

.get_7triangles(A = 1)

Value

a SpatialPolygons object

Arguments

A

defines the area of a region in the center

References

tools:::Rd_expr_doi("10.1109/TVCG.2004.1260761")

Examples

Run this code
triangle.map <- recmap:::.get_7triangles()
z <- c(rep(4, 4), rep(1, 3))
cols <- c(rep('white', 4), rep('grey',3))

op <- par(mfrow=c(1,2), mar=c(0, 0, 0, 0))
plot(triangle.map, col=cols)

if (FALSE) {
 # requires libfft.so installed in linux 
if (require(getcartr) & require(Rcartogram)){
  cartogram <- quick.carto(triangle.map, z, res=64)
  plot(cartogram, col=cols)
}
}

Run the code above in your browser using DataLab