- Matplotlib 2.x By Example
- Allen Yu Claire Chung Aldrin Yim
- 60字
- 2021-07-02 19:34:34
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:

推薦閱讀
- Practical Data Analysis Cookbook
- Instant Testing with CasperJS
- 計算思維與算法入門
- LabVIEW入門與實戰開發100例
- Python深度學習
- 數據結構簡明教程(第2版)微課版
- Python進階編程:編寫更高效、優雅的Python代碼
- Learning Python Design Patterns(Second Edition)
- Test-Driven Machine Learning
- Mastering Apache Camel
- C++服務器開發精髓
- Google Maps JavaScript API Cookbook
- Kohana 3.0 Beginner's Guide
- Mastering Clojure
- Distributed Computing with Python