Skip to content

Instantly share code, notes, and snippets.

@edy555
Created March 30, 2013 02:18
Show Gist options
  • Save edy555/5274996 to your computer and use it in GitHub Desktop.
Save edy555/5274996 to your computer and use it in GitHub Desktop.
matplotlibによるVNA測定結果のプロット
from pylab import *
f,arg,mag,ref = loadtxt('vnaplot.dat', delimiter=' ', unpack=True)
subplot(2,1,1)
plot(f, mag, label='mag')
plot(f, ref, label='ref')
xlabel('Frequency (Hz)')
ylabel('Amplitude (dB)')
grid(True)
subplot(2,1,2)
plot(f, arg, label='arg')
xlabel('Frequency (Hz)')
ylabel('Phase (radian)')
grid(True)
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment