Fix function plotting.
Support for writemime.