Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 780 Bytes

README.md

File metadata and controls

32 lines (20 loc) · 780 Bytes

Random Connected Graph Visualizer

Generate and visualize a connected random graph of n nodes

This Python script generates a connected random graph with a user-defined number of nodes. The nodes are labeled with letters starting from A.

Example to run:

python graph_generator.py 10

This will generate a visualization of a random graph consisting of 10 nodes, labeled A, B, C, etc.

The graph is visualized using the NetworkX and Matplotlib libraries.

Here is an example of the output:

Sample Figure

Requirements

  • Python 3.x
  • NetworkX
  • Matplotlib

To install the required libraries, run the following command:

pip install networkx matplotlib

The Code in this repo has been generated with assistance from GPT-4