-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
status: needs clarificationIssues that need more information to resolve.Issues that need more information to resolve.
Description
plt.psd(samples) shows a blank graph. This is a fresh linux debian install with code that normally works with matplotlib.
Matplotlib Version
3.4.3
Platform Python Version
3.7.3
Code Snippit:
import uhd
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import sys
print(matplotlib.__version__)
import platform
print(platform.python_version())
import matplotlib.animation as animation
#matplotlib.use('TkAgg')
np.set_printoptions(threshold=sys.maxsize)
usrp = uhd.usrp.MultiUSRP()
samples = usrp.recv_num_samps(10000, 100e6, 1e6, [0], 100)
print(samples[0:10])
fig = plt.figure()
ax1 = fig.add_subplot(1, 1, 1)
def animate(i):
#ax1.clear()
#samples = usrp.recv_num_samps(10000, 100e6, 1e6, [0], 100)
#fft1 = np.fft.fft(samples)
#plt.ylim(-10, 10)
#plt.plot(samples, marker="o")
#plt.show()
ax1.psd(samples[0:10])
#plt.show(block=False)
#plt.pause(00.01)
ani = animation.FuncAnimation(fig, animate, interval=1)
plt.show()
expected outcome:
A power spectrum density graph from the software defined radio.
Actual outcome:
Metadata
Metadata
Assignees
Labels
status: needs clarificationIssues that need more information to resolve.Issues that need more information to resolve.
