title: NetworkX: Circular plot with a node in the center
body: <p>I have a simple network where there are multiple distinct 'sources' connected to one specific node. The sources have no edges between themselves.</p>
  
  <p>I'm trying to plot a nice circular plot, where that specific node is dead in the center, and all the source nodes are neatly positioned in a circle around that center node, with the same distance (i.e. radius) from it. Distance itself is not defined, and should be relative to the figsize.</p>
  
  <p>I manage to get the target node in the center, and manage to get the other nodes form a nice circle, but not both at the same time. That is:</p>
  
  <p><a href="https://i.stack.imgur.com/plNfu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/plNfu.jpg" alt="enter image description here"></a></p>
  
  <p>or:</p>
  
  <p><a href="https://i.stack.imgur.com/hZvLn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hZvLn.jpg" alt="enter image description here"></a></p>
  
  <p>What I'm trying to do is get the red node in the center.</p>
  
  <p>Here's the code used to create the graph and the plots:</p>
  
  <pre><code>import pandas as pd
  import networkx as nx
  import matplotlib.pyplot as plt
  %matplotlib inline
  
  n = 283
  n_new = 41
  
  df = pd.DataFrame({'source': range(1, n+1),
                     'target':[0]*n,
                     'new_user':[0]*(n-n_new) + [1]*n_new
  })
  
  G = nx.from_pandas_dataframe(df, source='source', target='target', create_using=nx.DiGraph())
  </code></pre>
  
  <p>First plot:</p>
  
  <pre><code>plt.figure(figsize=(16,16))
  
  # Node colors
  val_map = df.iloc[:,:2].set_index('source').to_dict()['new_user']
  val_map[0] = 2
  values = [val_map.get(node, 0.25) for node in G.nodes()]
  
  pos = nx.circular_layout(G, scale=2)
  
  node_sizes = [1000] + [200]*283
  
  nx.draw(G, cmap=plt.get_cmap('jet'), node_color=values, font_size=18,
          alpha=0.4, node_size=node_sizes, arrows=True,
                 pos=pos)
  </code></pre>
  
  <p>Second plot:</p>
  
  <pre><code>plt.figure(figsize=(16,16))
  
  # node colors
  val_map = df.iloc[:,:2].set_index('source').to_dict()['new_user']
  val_map[0] = 2
  values = [val_map.get(node, 0.25) for node in G.nodes()]
  
  
  # Nodes layout/ position
  fixed_positions = {0:(0,0)}
  fixed_nodes = fixed_positions.keys()
  pos = nx.spring_layout(G,pos=fixed_positions, fixed = fixed_nodes, k=15)
  # pos = nx.circular_layout(G, scale=2)
  
  node_sizes = [1000] + [200]*283
  
  nx.draw(G, cmap=plt.get_cmap('jet'), node_color=values, font_size=18,
          alpha=0.4, node_size=node_sizes, arrows=True,
                 pos=pos)
  </code></pre>
  
  <p>Appreciate your help!</p>