I am trying to build a company connections network. in the center, the main company is located. in the inner circle there are its subsidiary companies. and the outer circle represents the companies that work with the subsidiary companies. i did the below network representation so far.
But here is the problem. i want the inner circle and the outer circle close to each other, in other words in the same direction. i keep the inner circle's coordinates but not able to calculate the outer circle's coordinates based on the fixed inner circle.
G1 = nx.from_pandas_edgelist(layer1_edges,
source='source',
target='target',
create_using=nx.MultiDiGraph())
pos1 = nx.circular_layout(G1, scale=200, center=(0, 0))
pos1["centered_node"] = np.array([0.0, 0.0])
G2 = nx.from_pandas_edgelist(layer2_edges,
source='source',
target='target',
create_using=nx.MultiDiGraph())
pos2 = nx.circular_layout(G2, scale=300, center=(0, 0))
F = nx.compose(G1, G2)
pos_f = pos1.copy()
for name, pos in pos2.items():
if name not in pos_f:
pos_f[name] = pos

The following answer assumes that the issue you are trying to solve is that nodes that are connected are typically not in close proximity to each other.
It looks like you have a multi-partite network, and are trying to plot that the network with a shell layout. NetworkX does implement a shell layout. However, this function does not implement edge crossing reduction or any other technique such that connected nodes are close to each other in the visualization.
As neither igraph of graph-tool seem to implement a shell layout, likely your only option is Netgraph, a library I wrote and maintain. Netgraph supports edge crossing reduction for a variety of node layouts, which in layered graphs typically has the effect that connected nodes are grouped together. For shell layouts, it uses the algorithm proposed in Eades & Wormald (1994). A tutorial can be found here. A simple visualisation similar to yours can be created using the following code: