Matplotlib: No plot

Hi,
I am trying to run the following program from the Python Machine Learning book,

import matplotlib.pyplot as plt
plt.plot([1,2,3,4,5,6,7,8,9,10],
        [2, 4.5, 1, 2, 3.5, 2, 1, 2, 3, 2]
)

I can’t see anything plotted. Please guide me.

Zulfi.

not sure why you wouldnt see something, that should draw a standard line plot.

Might want to try making them numpy arrays instead, but i thought it was supposed to take any array of numerics…

1 Like

Hi,
Is it because I don’t have nvidea graphic card? Kindly guide me how to install intel graphic card library for matplotlib.

Zulfi.

Use Matdeck.They’re a Python IDE with lots of other features but what you want is this.Check https://labdeck.com/python/python-examples/ under medium, the second one.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.