Improve handling of inputs in regplot (fixes #28)