{"id":17328608,"url":"https://github.com/zamhown/sorting-visualizer","last_synced_at":"2025-10-29T09:47:33.539Z","repository":{"id":100743948,"uuid":"137571007","full_name":"zamhown/sorting-visualizer","owner":"zamhown","description":"📊 Some python scripts which can visualize several famous sorting algorithms and generate the animations via Matplotlib.","archived":false,"fork":false,"pushed_at":"2020-02-20T22:12:14.000Z","size":12098,"stargazers_count":240,"open_issues_count":0,"forks_count":69,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-08T21:13:11.587Z","etag":null,"topics":["matplotlib","python","python3","sorting-algorithms","visualization"],"latest_commit_sha":null,"homepage":"https://zamhown.github.io/sorting-visualizer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zamhown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-16T09:59:44.000Z","updated_at":"2025-04-04T12:23:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff9ef255-743b-40a5-a4da-f494ef817c4a","html_url":"https://github.com/zamhown/sorting-visualizer","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"e581d347cd22ccf3e93926a2e7f5ae9d08b8418d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zamhown/sorting-visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamhown%2Fsorting-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamhown%2Fsorting-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamhown%2Fsorting-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamhown%2Fsorting-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zamhown","download_url":"https://codeload.github.com/zamhown/sorting-visualizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamhown%2Fsorting-visualizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268456622,"owners_count":24253256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matplotlib","python","python3","sorting-algorithms","visualization"],"created_at":"2024-10-15T14:24:37.178Z","updated_at":"2025-10-29T09:47:28.502Z","avatar_url":"https://github.com/zamhown.png","language":"Python","readme":"# Sorting Visualizer\nThere are some python scripts which can visualize several famous sorting algorithms and generate the animations via Matplotlib.  \n\nClick the picture below to play the sample video.  \n[![click to play video](https://raw.githubusercontent.com/zamhown/sorting-visualizer/master/img/play_video.jpg)](https://www.bilibili.com/video/av25140582/)  \n(You can also experience the [webpage edition](https://zamhown.github.io/sorting-visualizer).)\n## Environment Configuring\n* Install [Python 3](https://www.python.org/downloads/) or [Anaconda](https://www.anaconda.com/download/) which includes it.\n* Install [Matplotlib](https://matplotlib.org/users/installing.html) via pip. However, if you have installed Anaconda before, you needn't install Matplotlib any more.\n* If you need export the animations of sorting algorithms as MP4 files, you should download an offical release of FFMpeg (there is [the link](https://ffmpeg.zeranoe.com/builds/)). 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.\n## Usage\nUnder the root directory of the project, run the commands like the following format to call all functions:  \n```\npython output.py arg1 [arg2 [arg3]]  \n```\nDetails of the three arguments above:  \n* There are three posible options as \"*arg1*\":\n    * `play` : Play an animation of a specific sorting algorithm or all algorithms in a new window, as a \"figure\" to Matplotlib.\n    * `save-html` : Save the animation as a HTML page with a sequence of images.\n    * `save-mp4` : Save the animation as a MP4 video.\n* There are nine posible options as \"*arg2*\":\n    * `all` *(default)* : Show the visualization of all sorting algorithms in the animation.\n    * `bubble-sort` : Only show the visualization of bubble sorting algorithm in the animation. The following arguments have similar functions.\n    * `comb-sort`\n    * `heap-sort`\n    * `insertion-sort`\n    * `merge-sort`\n    * `quick-sort`\n    * `selection-sort`\n    * `shell-sort`\n* There are four posible options as \"*arg3*\":\n    * `almost-sorted` : Sort an almost-sorted sequence.\n    * `few-unique` : Sort a few-unique sequence.\n    * `random` *(default)* : Sort a random sequence.\n    * `reversed` : Sort a descending sequence.  \n\nFor 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.  \n\nThere's nothing else need to be introduced. Have fun!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamhown%2Fsorting-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzamhown%2Fsorting-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamhown%2Fsorting-visualizer/lists"}