Sep-13-2021, 06:48 AM
Hello,
I have a question of how I can plot the two arrays against each other from the link below. The array on the top should be plotted against the other array below it, but how do I fix the mismatch between them?
When I try to plot them, I got this error message "TypeError: unhashable type: 'numpy.ndarray'"
I have a question of how I can plot the two arrays against each other from the link below. The array on the top should be plotted against the other array below it, but how do I fix the mismatch between them?
When I try to plot them, I got this error message "TypeError: unhashable type: 'numpy.ndarray'"
import csv import itertools import pandas import numpy as np import pandas as pd import matplotlib.pyplot as plt #for time_seconds in range(1878820): #for time_seconds in range(1527): # time = time_seconds #print(time) time = np.arange(0, 1527, 1) time_transposed = np.c_[time] print(time_transposed) with open("out_isi.txt", mode='r') as f: # data = csv.reader(f, delimiter=' ', quotechar='|') data = csv.reader(f) my_data = list(data) print(my_data) plt.plot(time_transposed, my_data) plt.show()https://i.imgur.com/FbjPszX.png