Created
November 19, 2017 07:18
-
-
Save RJ722/3c51ef245954343d7c97901b624c8195 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
from matplotlib import pyplot as plt | |
import numpy as np | |
import random | |
def random_temp_for_day(n): | |
i_value = random.randrange(18, 25) | |
return [random.randrange(i_value - 3, i_value+ 3) for _ in range(n)] | |
def main(): | |
number_of_days = 40 | |
n_time_instances = 4 | |
data = [random_temp_for_day(n_time_instances) \ | |
for i in range(number_of_days)] | |
for i in data: | |
plt.plot(range(1, 5), i, 'ro') | |
plt.show() | |
for i in data: | |
plt.plot(range(1, 5), i) | |
plt.show() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment