Adds support for functions with multiple arguments

- Functions with multiple arguments are now supported. The algorithm
automatically detects which function argument varies the most and uses
this as the x-axis.