graphviz: Different orientation of the sub graphs - graphviz

I would like to create graph with 3 sub graphs. Could two of them have left-right orientation and third top-bottom orientation as in this example?
I need also connect a few nodes from one subgraph to another but this should be easy.

This is not possible with graphviz. rankdir is a graph attribute (not subgraph or cluster).

Related

Graphviz: Graph with a node common in multiple subgraphs?

The objective is to able to create graphs in which a node can be overlapping between two or more subgraphs. Something like in the (erroneous) image below (A->B and A->C are in different subgraphs):
Something similar has been asked in Graphviz: Node in two subgraph and also in Same node in two subgraphs, but there had been no solution. This is something essential in graphs, and there should be an easy way of achieving that.
Overlapping subgraphs is not supported by GraphViz

Graphviz creates two arrows between subplots

I want to create a graphviz graph which contains two subgraphs containing nodes which are linked to other nodes in the other graph.
Some nodes need to be aligned horizontally to each other.
I've found out about the newrank=true command and I'm using it to achieve my described goal.
For some reason I've found that really weird behaviour:
If I create two nodes in one cluster and an arrow from one to the other and then another arrow pointing towards a third node in another cluster, graphviz will display two arrows.
digraph g{
newrank=true;
subgraph cluster_d{
A -> B
}
subgraph cluster_v{
C
}
{rank=same; A, B, C }
B -> C
}
I know, that I could simply use rankdir=LR and remove the rank=same, but in a larger graph with more nodes and subgraphs I seem to run into this problem sooner or later anyway.
I just created the artificial example above, to narrow the problem down.
Here is the code in use:
https://hackmd.io/s/B1NXAiTk7#
Why does Graphviz create two arrows between the subgraphs and how can I prevent this?
Related to: Why is graphviz drawing two arrows, and using a weird order?
But there was no satisfying answer and I think I narrowed the problem down.

using d3 for directed graph visualization

I want to use d3 force-directed layout for visualizing my graph. However, I want to show edge direction since it is a directed graph. Is it possible to show this using d3?

draw edge from node to edge in graphviz

Is it possible to draw an edge from a Node to the center of an existing Edge in graphviz? I would like to duplicate this type of reaction diagram, common in chemical or biological networks.
Thanks!
--Peter
Yes, you can use invisible nodes, like in this example for instance.
Then play with creating subgraphs for A and B where
rank=same
and then an edge where
constraint=false
for the connection from C to the invisible node. This will put the first two above C.

GraphViz, fixed layout when clustering

I have dot (graphviz) file with given graph which consist several nodes and edges.
I would like to create a copy of that graph and cluster cluster (group) few nodes together.
However whenever I am doing that the layout of the graph is changing (adopting to the cluster).
Is there any way I could fix the position of the graph and then add clustering?
If for instance, you want to show a "before and after" (one graph w/out the cluster and one with), it might be easiest to initially create both graphs with the clusters (so that they look identical). Then for the graph that you want "unclustered", set all of the subgraph parameters so that the cluster annotations are invisible--i.e., with no cluster label and with a color that is the same as the background color of your graph. the cluster will appear invisible.
So for instance, in the code below, the cluster will appear invisible:
subgraph cluster_inv {
node [style=filled];
N1 -> N2 -> N3;
label="";
color="#FFFFFF";
}

Resources