Last active
November 2, 2018 18:59
-
-
Save Esaslow/eee1c52c34e23ddd237d4239f56a4cd6 to your computer and use it in GitHub Desktop.
How to plot x ^ 2 with python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import our modules that we are using | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# Create the vectors X and Y | |
x = np.array(range(100)) | |
y = x ** 2 | |
# Create the plot | |
plt.plot(x,y) | |
# Show the plot | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment