Hi everyone,
I am trying to display multiple plots with different shapes. However, I got an error message ValueError: x and y must have same first dimension, but have shapes (10000,) and (5000,)
Actually, they have different shapes and must be displayed in different plots.
Expectation: Display 2 charts for signals
and resampled_signal
Here is my code:
time = np.arange(signals.size) / fs_target
fig1 = plt.figure()
fig2 = plt.figure()
ax1 = fig1.add_subplot(111)
ax2 = fig2.add_subplot(111)
ax1.plot(time, signals, color='blue', marker='o')
ax2.plot(time, resampled_signal, color='blue', marker='o')
st.pyplot(plt)
I followed the idea in python - pyplot plotting with different shapes - Stack Overflow, but the error will come when the st.pyplot(plt)
is executed.