How to draw a simple relation graph in Python


The process of drawing a simple relation graph in python can be broken down into 2 steps.

  1. Define a graph.
  2. Draw a graph.

In this step, we will use the networkx package.

If you are using conda, you can just type conda install networkx

If you are using pip, you can just type pip install networkx