Skip to content

Instantly share code, notes, and snippets.

@fcunhaneto
Last active September 5, 2018 11:51
Show Gist options
  • Save fcunhaneto/55efc4d1cffef433a9e02dfa9e5847a1 to your computer and use it in GitHub Desktop.
Save fcunhaneto/55efc4d1cffef433a9e02dfa9e5847a1 to your computer and use it in GitHub Desktop.
Matplot mais de uma linha em um gráfico.
import numpy as np
import matplotlib.pyplot as plt
"""
Mais de uma linha no gráfico
"""
x = np.arange(1, 11)
print(x)
plt.figure(figsize=(6, 4))
plt.plot(x, 2*x)
plt.plot(x, x/2)
plt.xlabel('x')
plt.ylabel('f(x)')
plt.grid(True)
plt.savefig('reta-simples-duas.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment