Skip to content

Scripts to visualize sorting algorithms using matplotlib animations

License

Notifications You must be signed in to change notification settings

lucs123/sorting-visualizer-matplotlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matplotlib sorting visualizer

Scripts to visualize sorting algorithms using matplotlib animations

Bar graph

Scatter graph

Algorithms available

  • Bubble sort
  • Quick sort
  • Heap sort
  • Intro sort

About

The aim of this project is to make sorting algorithms easier to visualize and understand, using the animation capabilities of matplotlib.

Dependencies

Manual

  • Install Matplotlib and Celluloid(if not already installed) pip install celluloid pip install matplotlib

  • Install ImageMagick or ffmpeg(optional)

  • Run main.py

python main.py

  1. (To run with defaut values just press enter)
  2. Select Data size(default 30)
  3. Select the algorithm(defaut is quicksort)
  4. Select the type of graph(defaut bar graph)
  5. Choose if you want to save

How to contribute

  1. Put new algorithm on root
  2. Import Plot from animate
  3. Use Plot function in algorithm function
  4. Add algorithm to algorithms in main file
  5. Add algorithm title in animate file

About

Scripts to visualize sorting algorithms using matplotlib animations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages