Updated parameter in stem plots used for FFTs.

这个提交包含在:
Craig Warren
2020-01-28 15:29:33 +01:00
父节点 8a9b7d2674
当前提交 a483b68496
共有 3 个文件被更改,包括 14 次插入14 次删除

查看文件

@@ -105,7 +105,7 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False):
ax1.grid(which='both', axis='both', linestyle='-.')
# Plot frequency spectra
markerline, stemlines, baseline = ax2.stem(freqs[pltrange], power[pltrange], '-.')
markerline, stemlines, baseline = ax2.stem(freqs[pltrange], power[pltrange], '-.', use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'r')
plt.setp(markerline, 'markerfacecolor', 'r', 'markeredgecolor', 'r')

查看文件

@@ -191,7 +191,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of incident voltage
ax = plt.subplot(gs1[0, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vincp[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vincp[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'r')
plt.setp(markerline, 'markerfacecolor', 'r', 'markeredgecolor', 'r')
@@ -212,7 +212,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of incident current
ax = plt.subplot(gs1[1, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Iincp[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Iincp[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'b')
plt.setp(markerline, 'markerfacecolor', 'b', 'markeredgecolor', 'b')
@@ -233,7 +233,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of total voltage
ax = plt.subplot(gs1[2, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vtotalp[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vtotalp[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'r')
plt.setp(markerline, 'markerfacecolor', 'r', 'markeredgecolor', 'r')
@@ -254,7 +254,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of total current
ax = plt.subplot(gs1[3, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Itotalp[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], Itotalp[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'b')
plt.setp(markerline, 'markerfacecolor', 'b', 'markeredgecolor', 'b')
@@ -275,7 +275,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of reflected voltage
# ax = plt.subplot(gs1[4, 1])
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vrefp[pltrange], '-.')
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vrefp[pltrange], '-.' use_line_collection=True)
# plt.setp(baseline, 'linewidth', 0)
# plt.setp(stemlines, 'color', 'r')
# plt.setp(markerline, 'markerfacecolor', 'r', 'markeredgecolor', 'r')
@@ -296,7 +296,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of reflected current
# ax = plt.subplot(gs1[5, 1])
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Irefp[pltrange], '-.')
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Irefp[pltrange], '-.' use_line_collection=True)
# plt.setp(baseline, 'linewidth', 0)
# plt.setp(stemlines, 'color', 'b')
# plt.setp(markerline, 'markerfacecolor', 'b', 'markeredgecolor', 'b')
@@ -311,7 +311,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
fig2, ax = plt.subplots(num='Antenna parameters', figsize=(20, 12), facecolor='w', edgecolor='w')
gs2 = gridspec.GridSpec(2, 2, hspace=0.3)
ax = plt.subplot(gs2[0, 0])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], s11[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], s11[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'g')
plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')
@@ -326,7 +326,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot frequency spectra of s21
if s21 is not None:
ax = plt.subplot(gs2[0, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], s21[pltrange], '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], s21[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'g')
plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')
@@ -340,7 +340,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot input resistance (real part of impedance)
ax = plt.subplot(gs2[1, 0])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], zin[pltrange].real, '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], zin[pltrange].real, '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'g')
plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')
@@ -355,7 +355,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot input reactance (imaginery part of impedance)
ax = plt.subplot(gs2[1, 1])
markerline, stemlines, baseline = ax.stem(freqs[pltrange], zin[pltrange].imag, '-.')
markerline, stemlines, baseline = ax.stem(freqs[pltrange], zin[pltrange].imag, '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'g')
plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')
@@ -369,7 +369,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot input admittance (magnitude)
# ax = plt.subplot(gs2[2, 0])
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], np.abs(yin[pltrange]), '-.')
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], np.abs(yin[pltrange]), '-.' use_line_collection=True)
# plt.setp(baseline, 'linewidth', 0)
# plt.setp(stemlines, 'color', 'g')
# plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')
@@ -383,7 +383,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
# Plot input admittance (phase)
# ax = plt.subplot(gs2[2, 1])
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], np.angle(yin[pltrange], deg=True), '-.')
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], np.angle(yin[pltrange], deg=True), '-.' use_line_collection=True)
# plt.setp(baseline, 'linewidth', 0)
# plt.setp(stemlines, 'color', 'g')
# plt.setp(markerline, 'markerfacecolor', 'g', 'markeredgecolor', 'g')

查看文件

@@ -119,7 +119,7 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False):
ax1.set_ylabel('Amplitude')
# Plot frequency spectra
markerline, stemlines, baseline = ax2.stem(freqs[pltrange], power[pltrange], '-.')
markerline, stemlines, baseline = ax2.stem(freqs[pltrange], power[pltrange], '-.' use_line_collection=True)
plt.setp(baseline, 'linewidth', 0)
plt.setp(stemlines, 'color', 'r')
plt.setp(markerline, 'markerfacecolor', 'r', 'markeredgecolor', 'r')