小编MCN*_*CNC的帖子

Plot series of filled hexagons in ggplot2

I am trying to create a tesselation of filled hexagons (polygons centered around a hexagonally-spaced lattice) in ggplot2. I have accomplished this using the 'plot' command but am struggling transitioning this to ggplot.

Here is the code for the set-up:

# Generate a lattice of points equally spaced in the centers of a hexagonal lattice
dist = 1     # distance between the centers of hexagons
nx = dist*15 # horizontal extent
ny = dist*15 # vertical extent      

MakeHexLattice = function(nx, …
Run Code Online (Sandbox Code Playgroud)

plot r ggplot2

4
推荐指数
1
解决办法
1241
查看次数

标签 统计

ggplot2 ×1

plot ×1

r ×1