|
From: Jeffrey S. <jef...@gm...> - 2012-08-29 07:12:11
|
For example running this code and then fig.tight_layout(). The second axis
isn't recognized. Is there a way to add it to the tight_layout spec or a
better method.
out = ones(200)
fign = 52
h, w = freqz(out)
fig = figure(fign)
semilogy(h,abs(w)/abs(max(w)), 'b', label='Mag')
ylim(0.01,1.2)
ylabel('Amplitude (db)', color='b')
xlabel('Frequency (rad/sample)')
ax = fig.gca()
ax2 = ax.twinx()
angles = unwrap(angle(w))
plot(h, angles, 'g')
ylabel('Phase (rads)', color='g')
Cheers,
Jeff
|