DOC: print plots in docstring examples

Also add stat_function to API docs.