I am currently looking into how the 1815 Mount Tambora eruption caused the so-called "Year without a Summer" and need some help plotting data.
I have a text file from a weather station that provides daily temperature data for the year I am interested in (1816). Each column in the file represents the month, from January through to December, (bar the first one) and each row is the day in the month;
1 -22 5 52 82 102 155 176 168 100 114 89 54
2 -31 21 68 107 139 177 146 159 90 118 85 74
3 -49 41 63 103 170 134 144 140 106 99 86 63
4 -52 56 77 109 180 137 153 136 105 105 52 90
5 -66 75 67 103 169 165 160 145 102 90 62 74
6 -35 80 60 82 121 152 173 131 123 96 86 60
7 -17 69 34 91 128 175 195 125 139 103 75 65
8 -7 80 -17 79 152 161 135 134 148 104 34 64
I am relatively new to Python, but can certainly do basic plotting... but the way the data is presented here has me slightly stumped! What I would like to plot is the whole year, with the days/months on the x-axis, and the temperature values on the y-axis, on one graph. This would then allow me to compare this year with other years!
I can do basic things like select the column that would represent January and set all -999 values to nan, i.e.
d = np.loadtxt("test.txt")
January = d[:,1]
January[January <= -999] = np.nan
But struggle to think of a way to plot all the data the way I want it.
Any help would be much appreciated!