Skip to content

Instantly share code, notes, and snippets.

@fcunhaneto
Last active September 5, 2018 11:49
Show Gist options
  • Save fcunhaneto/b46f1e2d5c97163fafa2597419e7e669 to your computer and use it in GitHub Desktop.
Save fcunhaneto/b46f1e2d5c97163fafa2597419e7e669 to your computer and use it in GitHub Desktop.
matplot-pandas-1
import numpy as np
import matplotlib.pyplot as plt
"""
Plotagem de uma reta simples f(x) = 2x
"""
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.savefig('reta-simples.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment