I cannot GraphPlot edges defined via [DirectedEdge].
It seems quite confusing to me.
Perhaps some goes wrong in my Matematica installation?
Hi Flavio, What sort of problem are you having? Perhaps you could post some code? You can find out how to do that and much more here How to post
In[7]:= edges = {DirectedEdge[a, b], UndirectedEdge[b, c],
DirectedEdge[c, a]}
Out[7]= {a \[DirectedEdge] b, b <-> c, c \[DirectedEdge] a}
In[8]:= GraphPlot[Graph@edges, DirectedEdges -> True]
The documentation page for GraphPlot seems to show that it uses Rule to identify edges. It also seems to show that each Rule indicates an edge in one direction. Thus if you want an undirected edge you give one rule for each direction. Does this work for you?
GraphPlot[{1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2}, DirectedEdges -> True, VertexLabeling -> True]
Click on the Details and Options on the documentation page to see more information on how to use GraphPlot.
Dear David, thank you for your reply.
See the attached Notebook
Best
Dear Bill, thank you for your reply.
Please see the attached Notebook
Best
GraphPlot[Graph@edgeList3] if you want to use DirectedEdge.
Thank you Bill. I am a mathematician. I like the neatness of Mathematica in handling formulas and data structures.
For GraphPlot a list of rules being a graph is confusing!
Moreover, Graph[ {list of rules}] results in a graph is a mess!?
What is your opinion?
I think I see the problem, Flavio. This is not well documented, but apparently GraphPlot will plot a graph either from a list of rules, or from a Graph object. Your edgeList4 is a list of rules, so GraphPlot will plot it. However, your edgeList3 is a list of edges. It needs to be made into a Graph object – Graph[edgeList3] – before it can be passed to GraphPlot.
Best, David
Thank you David.
I think this is confusing.
It upsets Mathematica clearness.
Best,
Flavio

