Draw a grid-like graph using Matplotlib.
cirq.draw_gridlike(
graph: nx.Graph,
ax: Optional[plt.Axes] = None,
tilted: bool = True,
**kwargs
) -> Dict[Any, Tuple[int, int]]
Used in the notebooks
Used in the tutorials |
---|
This wraps nx.draw_networkx to produce a matplotlib drawing of the graph. Nodes should be two-dimensional gridlike objects.
Returns | |
---|---|
A positions dictionary mapping nodes to (x, y) coordinates suitable for future calls to NetworkX plotting functionality. |