Visualizing the output of a Voronoi diagram computation
I didn't quite follow the description of your graph, but are you aware of this functionality?:
data = MapIndexed[Flatten[{##}] &, RandomReal[1, {100, 2}]];
ListDensityPlot[
data,
InterpolationOrder -> 0,
ColorFunction -> Hue,
Mesh -> All,
Epilog -> Point@data[[All, {1, 2}]]
]
Specifically note InterpolationOrder -> 0
.
Here is a nice clean way to both compute and plot the Voronoi diagram with some undocumented functions:
Graphics`Region`RegionInit[];
Then:
pts = RandomReal[6, {100, 2}];
Show[GeometryPlot[VoronoiMesh[pts], Mesh -> All,
PlotStyle -> {Opacity[0.3], Yellow},
MeshStyle -> {Darker@Green, Dashed}], Graphics[{Red, Point[pts]}]]
Now in Mathematica 10, VoronoiMesh is a standard built in function.
pts=RandomReal[{-1,1},{25,2}];
Show[VoronoiMesh[pts]
,Graphics[{Red,Point[pts]}]
,Frame-> True
]