Last active
June 7, 2016 11:12
-
-
Save chemacortes/74a238cd5ae19fd78bf320581fe4d126 to your computer and use it in GitHub Desktop.
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
%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