An interactive desktop GUI application for creating graphs and visualizing classical graph algorithms
with smooth animations, a modern dark UI, and intuitive editing tools.
Built using Python + Tkinter, with clean algorithm logic preserved exactly as in theory.
You can download the latest pre-built executable here:
👉 GitHub Releases:
https://github.com/Taiga0727/Graph-algorithm-visualizer/blob/main/2graph_gui.exe
All algorithms use textbook-accurate, untouched original logic:
- DFS – Depth-First Search Spanning Tree
- BFS – Breadth-First Search Spanning Tree
- Dijkstra – Shortest Path
- Prim – Minimum Spanning Tree (starting from a root)
- Kruskal – Minimum Spanning Tree (Union-Find)
Each algorithm displays:
- Step-by-step expansion
- Highlighted edges and nodes
- Execution order
- Live animation on the graph
- Result summary panel
- Click to create nodes (A, B, C, …)
- Click node → node to create weighted edges
- Drag nodes to move their positions
- Select multiple nodes with a box selection tool
- Delete node / delete edge / delete selected
- Run algorithms with animations
- Save graph to
.json - Load graph back anytime
- Click empty canvas → create node
- Click node → other node → create edge (weight dialog pops up)
- Click node → select
- Drag empty space → pan canvas
- Scroll → zoom
- Ctrl + Scroll → fast zoom
- Drag a rectangle → select multiple nodes
- Drag selected nodes → move as a group
- Click to remove individual nodes or edges
- Remove all highlighted nodes in one action
- Mouse Wheel → zoom in/out
- Ctrl + Wheel → faster zoom
- View menu provides + / − zoom buttons as well
- Delete / Backspace
- If nodes are selected → delete nodes
- If nothing selected → delete nearest edge
Includes:
- Full step list of algorithm execution
- Live-updating logs
- Card-style hover animation
- Node coloring:
- 🟩 Source
- 🟧 Target
- 🟡 Visited / Path
File → Save As…
Exports a .json file with:
{
"nodes": [{ "x": ..., "y": ... }],Load
File → Open… Reads a previously saved graph and redraws it.
💻 Running from Source
Install Python 3.8+
Create a file graph_visualizer.py
Paste the full code
Run:
python graph_visualizer.py📁 Project Structure
GraphAlgorithmsVisualizer/
│
├── graph_visualizer.py # Main application
├── README.md # Documentation
└── /releases # (optional) compiled executables on GitHub📝 License
This project is distributed under the MIT License. You may fork, use, and modify freely while crediting the original author.
👨💻 Author
Taiga0727 Designed for algorithm learning, visualization, and educational projects.