Skip to content

Instantly share code, notes, and snippets.

@chemacortes
Last active June 7, 2016 11:12
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 chemacortes/74a238cd5ae19fd78bf320581fe4d126 to your computer and use it in GitHub Desktop.
Save chemacortes/74a238cd5ae19fd78bf320581fe4d126 to your computer and use it in GitHub Desktop.
%matplotlib qt
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('bmh')
plt.figure(figsize = (12, 6))
for i in range(10):
x = np.arange(i * 10, i * 10 + 10)
y_var1 = np.random.randint(1, 5, 10)
y_var2 = np.random.randint(5, 8, 10)
line1, = plt.plot(x, y_var1, color = 'k')
line2, = plt.plot(x, y_var2, color = 'g')
if i==0:
line1.set_label("variable1")
line2.set_label("variable2")
plt.legend()
plt.ylim(0, 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment