Last active
September 5, 2018 11:51
-
-
Save fcunhaneto/e906305070dd58a1b8d43cf7237f52e9 to your computer and use it in GitHub Desktop.
Acrescentando labels a figuras com Matplot
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