Skip to content

Instantly share code, notes, and snippets.

Created March 30, 2013 02:24
What would you like to do?
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
f,arg,mag,ref = np.loadtxt('vnaplot.dat', delimiter=' ', unpack=True)
mpl.rcParams['legend.fontsize'] = 10
fig = plt.figure()
ax = fig.gca(projection='3d')
r = 10**mag
y = r * np.cos(arg)
z = r * np.sin(arg)
ax.plot(f, y, z, label='magnitude')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment