The code I have to read and plot data from my excel file is this:
import pandas as pd
import matplotlib.pyplot as plt
excel_file = 'file1.xlsx'
file1 = pd.read_excel(excel_file)
file1.head()
plt.plot(x,y1,y2)
plt.xlabel('wavelenghts')
plt.ylabel('reflectivity')
plt.legend(loc='upper left')
plt.show
It works.
The questions are:
I have more columns, but when I want to add
y3, y4,...I get the error thaty3 is undefined.In legend I want to change the name of
y1toCK4/5-PCA82500and others as well. Is there any way to do it?