Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I have pair of edges between nodes in this kind of graphs?

cities = CityData[{All, #}] & /@ {"Germany"}; bigcities = 
Select[Select[Join @@ cities, FreeQ[#, ""] &], 
CityData[#, "Population"] > 100000 &];
cityCoords = 
Select[CityData[#, "Coordinates"] & /@ bigcities, FreeQ[#, ""] &];
pts = Reverse[cityCoords, 2];
dt = DelaunayTriangulation[pts];
toPairs[{m_, ns_List}] := Map[{m, #} &, ns];
edges = Union[Sort /@ Flatten[toPairs /@ dt, 1]];
Graph[edges, ImagePadding -> 20, 
VertexCoordinates -> pts, VertexStyle -> LightBlue, 
VertexLabels -> bigcities[[All, 1]], 
Prolog -> {LightBrown, EdgeForm[{Thick, Black}], 
CountryData["Germany", "FullPolygon"]}, ImageSize -> 800]
share|improve this question
up vote 3 down vote accepted

Just use DirectedGraph. At default, that will replace undirected edge to a pair of directed edges.

enter image description here

share|improve this answer
hamir Thanks.Now I am embarrassed!! – Alex Sep 24 '13 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.