I am new to data science. I use Anaconda on windows 7. I plotted a sine curve by doing the following on iPython:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 1000)
y = np.sin(x)
plt.plot(x, y)
And I got this:
But when I got ready to name the axes, the curve disappeared. I wrote this code:
plt.xlabel("Time")
And I got this:
I also wrote this:
plt.ylabel("Speed")
So my question is, how can I plot a curve with labelled axes? (In other words, I will like the x-axis to be Time, the y-axis to be Speed and the curve intact)