展开全部
在此我只想强调一下各种库的文档、示e69da5e887aa3231313335323631343130323136353331333335326165例等自带资料的重要性。
下面都是matplotlib的demo里面的,正是你需要的这些功能。
multiple_figs_demo.py#!/usr/bin/env python
# Working with multiple figure windows and subplots
from pylab import *
t = arange(0.0, 2.0, 0.01)
s1 = sin(2*pi*t)
s2 = sin(4*pi*t)
figure(1)
subplot(211)
plot(t,s1)
subplot(212)
plot(t,2*s1)
figure(2)
plot(t,s2)
# now switch back to figure 1 and make some changes
figure(1)
subplot(211)
plot(t,s2, 'gs')
setp(gca(), 'xticklabels', [])
figure(1)
savefig('fig1')
figure(2)
savefig('fig2')
show()
下面是关于pdf的multipage_pdf.py# This is a demo of creating a pdf file with several pages.
import datetime