I need to plot a graph (to be specific: Fortune Algorithm output) with given vertex coordinates and a few unconnected vertices. I am thinking of using Mathematica for that.
GraphPlot
does much of the task with VertexCordinateRules
option but does not plot unconnected points.
So is there any way to do this?
And it would be even nicer if that graph comes with 2-D Axes. I was thinking to useListLinePlot
andPoint
commands but they give two different graphs as output.Is there any option for combining output from two graphs? (The
Show
command didn't help.)
Answer
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
.
Comments
Post a Comment