All Projects → zamhown → Sorting Visualizer

zamhown / Sorting Visualizer

Licence: mit
📊 Some python scripts which can visualize several famous sorting algorithms and generate the animations via Matplotlib.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Sorting Visualizer

alvito
Alvito - An Algorithm Visualization Tool for Python
Stars: ✭ 52 (-74%)
Mutual labels:  sorting-algorithms, matplotlib
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (-6.5%)
Mutual labels:  sorting-algorithms
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+998.5%)
Mutual labels:  matplotlib
Matplotlib Doc Zh
📖 [译] Matplotlib 用户指南
Stars: ✭ 178 (-11%)
Mutual labels:  matplotlib
Visualize ml
Python package for consolidated and extensive Univariate,Bivariate Data Analysis and Visualization catering to both categorical and continuous datasets.
Stars: ✭ 160 (-20%)
Mutual labels:  matplotlib
Tftb
A Python module for time-frequency analysis
Stars: ✭ 185 (-7.5%)
Mutual labels:  matplotlib
Plotbitrate
FFProbe Bitrate Graph
Stars: ✭ 148 (-26%)
Mutual labels:  matplotlib
Pycinrad
Decode CINRAD (China New Generation Weather Radar) data and visualize.
Stars: ✭ 200 (+0%)
Mutual labels:  matplotlib
Rootpy
A pythonic interface for the ROOT libraries on top of the PyROOT bindings.
Stars: ✭ 186 (-7%)
Mutual labels:  matplotlib
Radix
A fast string sorting algorithm (MSD radix sort)
Stars: ✭ 169 (-15.5%)
Mutual labels:  sorting-algorithms
Scientific Visualization Book
An open access book on scientific visualization using python and matplotlib
Stars: ✭ 6,336 (+3068%)
Mutual labels:  matplotlib
Matplotlib Tutorial
Matplotlib tutorial for beginner
Stars: ✭ 2,232 (+1016%)
Mutual labels:  matplotlib
Pretty Algorithms
🌊 Pretty, common and useful algorithms with modern JS and beautiful tests
Stars: ✭ 2,163 (+981.5%)
Mutual labels:  sorting-algorithms
Python Quickui
Scientific One-Liner Interactive GUI Library
Stars: ✭ 153 (-23.5%)
Mutual labels:  matplotlib
Pylustrator
Visualisations of data are at the core of every publication of scientific research results. They have to be as clear as possible to facilitate the communication of research. As data can have different formats and shapes, the visualisations often have to be adapted to reflect the data as well as possible. We developed Pylustrator, an interface to directly edit python generated matplotlib graphs to finalize them for publication. Therefore, subplots can be resized and dragged around by the mouse, text and annotations can be added. The changes can be saved to the initial plot file as python code.
Stars: ✭ 192 (-4%)
Mutual labels:  matplotlib
Cmasher
Scientific colormaps for making accessible, informative and 'cmashing' plots
Stars: ✭ 149 (-25.5%)
Mutual labels:  matplotlib
Algo Tree
Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.
Stars: ✭ 166 (-17%)
Mutual labels:  sorting-algorithms
Data Science Types
Mypy stubs, i.e., type information, for numpy, pandas and matplotlib
Stars: ✭ 180 (-10%)
Mutual labels:  matplotlib
Python Novice Inflammation
Programming with Python
Stars: ✭ 199 (-0.5%)
Mutual labels:  matplotlib
Matplotlib 3d
Experimental 3D axis for matplotlib
Stars: ✭ 198 (-1%)
Mutual labels:  matplotlib

Sorting Visualizer

There are some python scripts which can visualize several famous sorting algorithms and generate the animations via Matplotlib.

Click the picture below to play the sample video.
click to play video
(You can also experience the webpage edition.)

Environment Configuring

  • Install Python 3 or Anaconda which includes it.
  • Install Matplotlib via pip. However, if you have installed Anaconda before, you needn't install Matplotlib any more.
  • If you need export the animations of sorting algorithms as MP4 files, you should download an offical release of FFMpeg (there is the link). Taking Windows for example, after downloading, extract it to anywhere, and add [your_path]/ffmpeg/bin to the environment variable PATH to ensure you can run the command ffmpeg directly in CMD.

Usage

Under the root directory of the project, run the commands like the following format to call all functions:

python output.py arg1 [arg2 [arg3]]  

Details of the three arguments above:

  • There are three posible options as "arg1":
    • play : Play an animation of a specific sorting algorithm or all algorithms in a new window, as a "figure" to Matplotlib.
    • save-html : Save the animation as a HTML page with a sequence of images.
    • save-mp4 : Save the animation as a MP4 video.
  • There are nine posible options as "arg2":
    • all (default) : Show the visualization of all sorting algorithms in the animation.
    • bubble-sort : Only show the visualization of bubble sorting algorithm in the animation. The following arguments have similar functions.
    • comb-sort
    • heap-sort
    • insertion-sort
    • merge-sort
    • quick-sort
    • selection-sort
    • shell-sort
  • There are four posible options as "arg3":
    • almost-sorted : Sort an almost-sorted sequence.
    • few-unique : Sort a few-unique sequence.
    • random (default) : Sort a random sequence.
    • reversed : Sort a descending sequence.

For example, run python output.py play heap-sort reversed to create a new window to play the animation of sorting, which use heap sorting algorithms and sort a descending sequence.

There's nothing else need to be introduced. Have fun!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].