Skip to content

Instantly share code, notes, and snippets.

@Esaslow
Last active November 2, 2018 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Esaslow/eee1c52c34e23ddd237d4239f56a4cd6 to your computer and use it in GitHub Desktop.
Save Esaslow/eee1c52c34e23ddd237d4239f56a4cd6 to your computer and use it in GitHub Desktop.
How to plot x ^ 2 with python
# 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