Python-accessible savefig function
Arguments: filename: Output filename (extension determines format)