algoplot

algoplot uses Gnuplot to generate growth plots given N and functions.


License
MIT
Install
gem install algoplot -v 0.0.1

Documentation

algoplot: A script for comparing the growth of functions

Examples

Merge sort (O(n log n)) vs. bubble sort (O(n^2))

algoplot -o merge-vs-bubble.png 'x * log(x)' 'x**2'

merge sort vs. bubble sort plot

Usage

  • Run algoplot -h for specific options
  • Use x instead of n when plotting functions

Installation

You need

  • Gnuplot installed with the gnuplot command available on your $PATH. Ensure you have gnuplot-x11 installed for Debian/Ubuntu in order to plot non-ASCII graphics.
  • Ruby (only tested with 1.9.3)

Once you have the prerequisites installed, simply run the following command from your terminal:

gem install algoplot

You may need to prefix it with sudo depending on your setup.

Author

Jon-Michael Deldin dev@jmdeldin.com

https://github.com/jmdeldin/algoplot

Feedback and patches are welcome!