I have some datasets named group and I want to plot them on a empty figure. I mean when new dataset read by computer, my program will add it to figure.
for groups in seconds_list:
group = f[(groups)][:]
i_data = group['real']
q_data = group['imag']
i_data = np.array(i_data, dtype=float64)
q_data = np.array(q_data, dtype=float64)
# 10.log(10.(I^2+Q^2)+1) then rotate array w/ np.rot90()
power_ch1 = np.rot90(np.array(np.log10(((np.add(np.square(np.abs(i_data[:, ::2])) , np.square(np.abs(q_data[:, ::2]))))*10)+1)*10 , dtype=float64))
print("Group: ", groups)
fig, ax = plt.subplots()
ax.set_xlim(0, 475*200)
ax.set_ylim(0, 3000)
tx, ty = my_list[i]
ax.imshow(power_ch1, cmap='viridis', interpolation='nearest', aspect='auto', extent = (tx, tx+200, ty, ty+2700))
i +=1
plt.tight_layout()
plt.show()
I am using this code but I can't hold the old plots. I want to add new dataset next to old one. How can I do it? I was using hold on with matlab but I couldn't find an alternative for python.
