Quick Graph is an excellent graphing application that can be used on iPhones, iPads, and iPod Touch. Quick Graph is capable of graphing both in 2d and 3d in all standard coordinate systems: cartesian, polar, spherical and cylindrical.

Quick Graph is free, but advanced features can be bought for a fee.