matplotlib & pandas

This commit is contained in:
estomm
2020-09-26 22:03:11 +08:00
parent 73cc328c81
commit d31be4f219
599 changed files with 99925 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# 打印标准输出
将PNG打印到标准输出。
用法:python print_stdout.py > somefile.png
```python
import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
plt.savefig(sys.stdout.buffer)
```
## 下载这个示例
- [下载python源码: print_stdout_sgskip.py](https://matplotlib.org/_downloads/print_stdout_sgskip.py)
- [下载Jupyter notebook: print_stdout_sgskip.ipynb](https://matplotlib.org/_downloads/print_stdout_sgskip.ipynb)