Partially ordered graphs like Dynkin diagrams ?

Hello everyone,

I’m looking for a way to draw partially ordered graphs with multiple edges in Mathematica : typically, I would like to draw Dynkin diagrams.

More precisely, this is the property of the graph I’m trying to construct :

  • The graph can have simple and/or multiple edges
  • If an edge is simple, then it is undirected
  • If an edge is multiple, then it is directed

Typical exemples of such diagrams can be seen on this page.

I tried with Graph, AdgencyGraph and GraphPlot, but I did’nt work out a solution. Does anyone have an idea ?
Thanks.

Can you show the code that you have tried? The Graph supports mixed directed / undirected and multi-edges, so it is not impossible.

Graph[RandomChoice[{Style[#1 -> #2, Red], #1 <-> #2}] & @@@ RandomInteger[{1, 5}, {30, 2}]]

First of all, thank you for your answer.

I simply tried Graph[{1 → 2, 2 ↔ 3}] and I have this error message : Graph::supp: Mixed graphs and multigraphs are not supported.
I tried copying exactly you code and I have the same error.

Could it be some problem of version : I have Mathematica 9.0 student edition. I’ll try to install the last version, but I only have a student licence (I’ve read that there was a few things that weren’t included in the student version, maybe this is one of them).

Yes, indeed, mixed graphs and multigraphs appeared only in the (currently latest) version 10.

I installed the version 10 : now it works. Thank you for your help.