Setting the output format

The pyplot.savefig() function takes the path of the output file and automatically outputs it in the specified extension. For example, pyplot.savefig('output.png') will generate a PNG image. If no extension is specified, an SVG image will be generated by default. If the specified format is unsupported, let's say .doc, a ValueError Python exception will be thrown:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset