Make plot(f, a, b) a little more general. (See #216)