# Mixed graph

Can we draw mixed graphs( graphs with some edges oriented while some are not) in sagemath?

Mixed graph

Can we draw mixed graphs( graphs with some edges oriented while some are not) in sagemath?

add a comment

1

I am not sure about your motivation, but a possibility is to use oriented graphs, and put edges from both `a`

to `b`

and `b`

to `a`

when you want to consider `(a,b)`

as a non-oriented edge. This double-edge construction is classical to define non-oriented graphs.

Yes I know that. But I need the diagrams as mixed graph. I need for several purposes. For example I need to print a mixed graph(with some edges without orientation), want its latex commands. Of course I need some operations on mixed graphs, that I had already done using the method you have mentioned.

Asked: **
2017-03-13 23:16:39 -0500
**

Seen: **72 times**

Last updated: **Mar 14**

Using a lambda expression in digraphs fails for len(G.sinks())?

Iterate over acyclic subdigraphs

How to get an arbitrary orientation of a graph.

How to get all digraphs with loops

Counting paths in directed graph with multiedges

How to recognise DiGraph equivalence

How to find the path of the maximal distance between two vertices on a complete digraph?

hasse diagram of a subset of a poset

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.