If we perform a standalone plot(f) and read here about the plot recipe for polynomials, one can make sense out of this.
It’s odd that the xlim=(1,7) argument must be replaced by the alternative syntax: plot(f, 1, 7); while ylim added to that does work though.