Menu

[r6524]: / branches / jdhunter / matplotlib / _simple_demo.py  Maximize  Restore  History

Download this file

26 lines (19 with data), 517 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Provides simple demos to be called from the development code
"""
from matplotlib.figure import Figure, Subplot
import Numeric as numpy
def subplot_demo():
f = Figure()
t = numpy.arange(0.0,3.0,0.01)
s1 = numpy.sin(2*numpy.pi*t)
s2 = numpy.zeros(t.shape, numpy.Float)
a1 = Subplot(211)
a1.plot(t,s1)
a1.set_title('And now for something completely different')
a2 = Subplot(212)
a2.plot(t,s2)
a2.set_xlabel('time (s)')
f.add_axis(a1)
f.add_axis(a2)
f.show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.