Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Jupyter notebook 2016-03-17-180118.ipynb

15 views
Kernel: Python 2 (SageMath)
import numpy as np import matplotlib.pyplot as plt %matplotlib inline
day = [1, 2, 3, 4, 5, 6, 7] print(day) print(day[3])
[1, 2, 3, 4, 5, 6, 7] 4
temp_Molins = [9, 11, 12, 13, 13, 13, 13] temp_Paris = [7, 6.5, 6.5, 6.5, 7, 7, 7.5] print(temp_Molins) print(temp_Molins[3])
[9, 11, 12, 13, 13, 13, 13] 13
plt.xlabel('day') plt.ylabel('temperature in Celsius') plt.title('Weather forecast - temperature') plt.plot(day,temp_Molins, label = 'Molins de Rei') plt.plot(day,temp_Paris, label = 'Paris') plt.ylim((0,17)) plt.legend()
<matplotlib.legend.Legend at 0x7fd4dd9e7210>
Image in a Jupyter notebook
plt.savefig('weatherMP.png')
<matplotlib.figure.Figure at 0x7fd4ddd3c0d0>