Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 973 Bytes

README.md

File metadata and controls

28 lines (17 loc) · 973 Bytes

Sorting Algorithms Visualized in Python

This code accompanies a post at makeartwithpython.com. It generates animations of Heap, Bubble, and Quicksort.

They all end up looking like this:

Everyone

Usage

Just run it from the command line:

$ python sorting.py -sorter heap

This will create an image sequence of the heap sort, in the heap folder.

Read the post to see how to turn the image sequence into a video / gif.

To see which parameters to use for the other sort algorithms, use:

$ python sorting.py --help

Prerequisites

You must have scikit-image installed. You can follow the instructions at http://scikit-image.org/docs/stable/install.html#standard-installation to install it.