Unable to PLOT multiple data from EXCEL using MATPLOTLIB
<p>I've an Excel file with 1000 rows &amp; 300 columns.
I want to plot (column 1) vs (column 2 to 288); my 1st Column is my X Axis, and the rest of the columns are on the Y axis. 
My code is below; I get no display.
There's no error message as such.</p>

<pre><code>from openpyxl import load_workbook
import numpy as np
import matplotlib.pyplot as plt

wb = load_workbook('CombinedData1.xlsx')
sheet_1 = wb.get_sheet_by_name('CombinedData')

x = np.zeros(sheet_1.max_row)
y = np.zeros(sheet_1.max_row)
a = np.zeros(sheet_1.max_column)
b = np.zeros(sheet_1.max_column)

print (sheet_1.max_row)
print (sheet_1.max_column)

for i in range(0, sheet_1.max_row):
    for j in range(1, 7):
        x[i] = sheet_1.cell(row=i + 1, column=j).value
        y[j] = sheet_1.cell(row=i + 1, column=j).value
        # z[i] = sheet_1.cell(row=i + 1, column=3).value
        print x[i]
        # print y[i]
        plt.plot(x[i], y[i], 'bo-', label='Values')

plt.grid(True)
plt.xlim(0,100)
plt.ylim(0,10)
plt.show()
</code></pre>

<p>Try something like the following nested loop:</p>

<pre>
for j in range(1, 7):
      for i in range(0, sheet_1.max_row):
               x[i] = sheet_1.cell(row=i + 1, column=j).value
               y[i] = sheet_1.cell(row=i + 1, column=j).value
               #z[i] = sheet_1.cell(row=i + 1, column=3).value
                print x[i]
               #print y[i]
      plt.plot(x, y, label='Values %d' % j, hold=1)
</pre>

<p>The hold-option will put the 7 individual plots together into one single plot. Furthermore, you should consider using the pandas package for importing and processing the sheet data.</p>

python excel numpy matplotlib xlrd