Last active
September 5, 2018 11:50
-
-
Save fcunhaneto/c55751c11c8e9c39af72e2ff137f6e2d to your computer and use it in GitHub Desktop.
Matplot reta simples com labels
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 numpy as np | |
import matplotlib.pyplot as plt | |
""" | |
Acrescentando Grid | |
""" | |
arr1 = np.array([1, 2, 3, 4, 5, 6, 7 ,8, 9, 10]) | |
arr2 = np.array([2, 4, 6, 8, 10, 12, 14 ,16, 18, 20]) | |
plt.figure(figsize=(6, 4)) | |
plt.plot(arr1, arr2) | |
plt.xlabel('x') | |
plt.ylabel('f(x) = x + 3') | |
plt.grid(True) | |
plt.savefig('reta-simples-labels.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment