Menu

[r4263]: / trunk / htdocs / screenshots / log_shot.py  Maximize  Restore  History

Download this file

21 lines (16 with data), 330 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from pylab import *
dt = 0.01
t = arange(dt, 20.0, dt)
subplot(211)
semilogx(t, sin(2*pi*t))
ylabel('semilog')
xticks([])
setp(gca(), 'xticklabels', [])
grid(True)
subplot(212)
loglog(t, 20*exp(-t/10.0), basey=4)
grid(True)
gca().xaxis.grid(True, which='minor') # minor grid on too
xlabel('time (s)')
ylabel('loglog')
show()