I plotted data from CSV file and I converted the same CSV file into NumPy array and plotted the same data. However, I get different graphs, which is confusing and can someone help me if I have made a mistake or I am missing to understand something.
Here is what I have coded and the respective images of the graph.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
csv_file1 = pd.read_csv('filename.csv')
columns = csv_file1.columns
column_name1 = columns[7]
column_name2 = columns[8]
column_name3 = columns[13]
csv_file1.plot(x=column_name3,y=column_name1,label='width')
csv_file1.plot(x=column_name3,y=column_name2,label = 'normalised width')
data_array = csv_file1.to_numpy()
plt.figure()
plt.plot(data_array[13],data_array[7])
Plot using data from the csv file:
Plot using data from the csv file converted to numpy array: