matplotlibによるVNA測定結果の3D表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | |
ax.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment