3D Stem

Digital Signal IQ Samples

3D stem plot showing in-phase and quadrature components of a damped digital signal.

Output
Digital Signal IQ Samples
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

# Digital signal sampling
n = 30
t = np.linspace(0, 4*np.pi, n)
x = t / (4*np.pi)
y = np.sin(t) * np.exp(-t/10)
z = np.cos(t) * np.exp(-t/10)

fig = plt.figure(figsize=(10, 8), facecolor='#0a0a0f')
ax = fig.add_subplot(111, projection='3d', facecolor='#0a0a0f')

# Stem plot
markerline, stemlines, baseline = ax.stem(x, y, z, linefmt='-', markerfmt='o', basefmt=' ')
plt.setp(stemlines, color='#06b6d4', linewidth=1.5, alpha=0.7)
plt.setp(markerline, color='#22d3ee', markersize=8)

ax.set_xlabel('Time (normalized)', color='white', fontsize=10)
ax.set_ylabel('In-Phase', color='white', fontsize=10)
ax.set_zlabel('Quadrature', color='white', fontsize=10)
ax.set_title('Digital Signal IQ Samples', color='white', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#64748b', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#1e293b')
ax.yaxis.pane.set_edgecolor('#1e293b')
ax.zaxis.pane.set_edgecolor('#1e293b')

ax.view_init(elev=20, azim=45)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support