I have a text file that contain 2048 rows and 256 columns, i want to plot only 10 columns of data in an subplot,
I tried
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
data=np.loadtxt("input_data.txt")
data=data[:,0:10]
print(data.shape)
nrows=5
ncols=10
fig, axs = plt.subplots(nrows,ncols, figsize=(13,10))
count = 0
for i in range(ncols):
for j in range(nrows):
axs[i,j].plot(data[count])
count += 1
print(count)
plt.show()
But it doesnot plot the each column values, I hope experts may help me.Thanks.