R语言 ggplot2主题中的背景线

u0njafvf  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(85)

我的数据

structure(list(date = structure(c(19358, 19389, 19417, 19448, 
19478, 19509, 19539, 19570, 19601, 19359, 19390, 19418, 19449, 
19479, 19510, 19540, 19571, 19602, 19360, 19391, 19419, 19450, 
19480, 19511, 19541, 19572, 19603, 19361, 19392, 19420, 19451, 
19481, 19512, 19542, 19573, 19604, 19362, 19393, 19421, 19452, 
19482, 19513, 19543, 19574, 19605, 19363, 19394, 19422, 19453, 
19483, 19514, 19544, 19575, 19606, 19364, 19395, 19423, 19454, 
19484, 19515, 19545, 19576, 19607, 19365, 19396, 19424, 19455, 
19485, 19516, 19546, 19577, 19608, 19366, 19397, 19425, 19456, 
19486, 19517, 19547, 19578, 19609, 19367, 19398, 19426, 19457, 
19487, 19518, 19548, 19579, 19610, 19368, 19399, 19427, 19458, 
19488, 19519, 19549, 19580, 19611, 19369, 19400, 19428, 19459, 
19489, 19520, 19550, 19581, 19612, 19370, 19401, 19429, 19460, 
19490, 19521, 19551, 19582, 19613, 19371, 19402, 19430, 19461, 
19491, 19522, 19552, 19583, 19614, 19372, 19403, 19431, 19462, 
19492, 19523, 19553, 19584, 19615, 19373, 19404, 19432, 19463, 
19493, 19524, 19554, 19585, 19616, 19374, 19405, 19433, 19464, 
19494, 19525, 19555, 19586, 19617, 19375, 19406, 19434, 19465, 
19495, 19526, 19556, 19587, 19618, 19376, 19407, 19435, 19466, 
19496, 19527, 19557, 19588, 19619, 19377, 19408, 19436, 19467, 
19497, 19528, 19558, 19589, 19620, 19378, 19409, 19437, 19468, 
19498, 19529, 19559, 19590, 19621, 19379, 19410, 19438, 19469, 
19499, 19530, 19560, 19591, 19622, 19380, 19411, 19439, 19470, 
19500, 19531, 19561, 19592, 19623, 19381, 19412, 19440, 19471, 
19501, 19532, 19562, 19593, 19382, 19413, 19441, 19472, 19502, 
19533, 19563, 19594, 19383, 19414, 19442, 19473, 19503, 19534, 
19564, 19595, 19384, 19415, 19443, 19474, 19504, 19535, 19565, 
19596, 19385, 19416, 19444, 19475, 19505, 19536, 19566, 19597, 
19386, 19445, 19476, 19506, 19537, 19567, 19598, 19387, 19446, 
19477, 19507, 19538, 19568, 19599, 19388, 19447, 19508, 19569, 
19600), class = "Date"), tmin = c(7.8, 1.8, -1.6, 10.3, 12.1, 
13.5, 17.9, 21.2, 18.4, 9, 2.4, -1.6, 5.8, 13.5, 13.5, 20.2, 
22.1, 15.4, 5.9, 0.8, 0.1, 5.1, 16.2, 13.4, 22.3, 20.9, 15.4, 
3.1, 1.1, 1.4, 8.3, 14.8, 15.2, 20.5, 15.8, 16.1, 3, 4.5, 2.3, 
5.7, 12.2, 16.1, 21.3, 15.6, 16.7, 1.9, 2.3, 4.5, 9.1, 13.5, 
15.5, 21.6, 20.1, 18.1, 2.5, 2.8, 8.5, 9.2, 16.1, 15.8, 21.4, 
19, 19.9, 7.7, 2.3, 9.5, 9.3, 14.5, 15.9, 19.7, 22.6, 20.3, 5.9, 
4.2, 10.9, 10.6, 17.2, 14.6, 19.3, 24.2, 19.3, 3.4, 2, 8.6, 11.9, 
13.1, 16.3, 21.5, 22.8, 18.5, 4.9, 1.3, 8.9, 11.3, 10, 16.9, 
23.6, 23.5, 17.1, 1.7, 1.9, 9.8, 10, 10, 17.1, 21.3, 23.4, 17.5, 
3.7, 2.3, 10.1, 6.9, 8.4, 15.1, 21.4, 23.4, 16.5, 1.8, 4.3, 7.2, 
8.9, 9.2, 15.6, 22.8, 22.3, 18.4, 4.3, 5.8, 7, 10.1, 8.6, 17.9, 
21.1, 20.3, 15.5, 2.9, 3.8, 9.3, 10.5, 9.7, 19.9, 20.4, 19.9, 
16, 2.8, 3.4, 10.4, 10.7, 8.3, 20.9, 22.2, 20.9, 14.9, 2.1, 5.8, 
6.5, 8.9, 9.6, 20.3, 25, 20.6, 14.5, 1.2, 7.9, 7.6, 10.4, 9.7, 
18.5, 25.3, 21.3, 13.6, 6.6, 9.1, 7, 11.6, 8.8, 19.2, 20.9, 21.8, 
13.5, 3.4, 8.6, 8.1, 12.1, 11.1, 16.2, 20.7, 25, 14.4, 0.2, 5.9, 
8.6, 12, 13.6, 15.4, 19.3, 24.7, 11.7, -1.8, 2.7, 8.3, 9.1, 13.5, 
19.6, 19.8, 25.7, 10.7, 0.2, -0.3, 9.9, 11.6, 13.4, 21.1, 19.2, 
24.1, 0.3, 0.1, 8.4, 13.3, 13.5, 23.1, 17.4, 22.9, -0.2, 0.1, 
9.5, 13.5, 12.1, 22.3, 18.1, 19.9, -1, 0.4, 7.2, 15.7, 13.3, 
22.3, 21.2, 16.1, -0.6, -1.8, 8.3, 18.7, 12.4, 22.9, 19.8, 15.1, 
-1.6, 10.6, 16.3, 12.4, 19.6, 21, 17.1, -1.1, 11.5, 14.1, 12.4, 
16.7, 22.4, 16.2, -1.6, 11.2, 12.6, 23.4, 17.4), tmax = c(14.8, 
11.8, 6.2, 19.1, 26.6, 25.1, 31.7, 36.6, 31.6, 11.8, 12.7, 9.9, 
18.5, 27.9, 24.1, 34.7, 35.7, 23.2, 12.1, 15.2, 11.9, 19.3, 29.1, 
25.3, 35.1, 32.8, 20.9, 11.6, 17, 12.4, 20.7, 25.4, 26.6, 33.5, 
29, 23.3, 11.6, 16.2, 10.3, 21.1, 26.5, 28, 33, 33, 27.3, 10.5, 
10.8, 13.4, 23.3, 28, 28.5, 33.7, 36.3, 27.6, 7.9, 8.4, 15.5, 
24.2, 27, 22, 34.2, 36.5, 29, 13.2, 9.9, 15.8, 26, 29, 20.3, 
32.7, 37.8, 29.4, 12.7, 10.3, 17.2, 26.5, 27.1, 24.1, 34.2, 39.5, 
27.4, 10.5, 9, 18.7, 26.2, 24.9, 26.8, 37.8, 38, 28.9, 9.2, 10.4, 
19.8, 25.9, 22.8, 27.9, 38, 38.8, 26, 10.6, 11.2, 20.6, 20, 19.4, 
28.3, 33.2, 37.9, 27, 11.1, 10, 19.9, 15.9, 20.7, 24.4, 35.1, 
37.8, 27.3, 10.3, 10.3, 17.2, 19.3, 20.6, 27, 36.8, 36.2, 26.7, 
11.2, 12.5, 19.3, 23.3, 21.7, 30.4, 32.3, 36.6, 24.3, 10.1, 14.1, 
22.8, 24, 22.4, 32.5, 34, 36.3, 22.2, 9.9, 14.8, 16.5, 25.1, 
23.8, 34, 38.7, 36.2, 19.2, 5.9, 14.3, 15.6, 22.9, 22.6, 30.8, 
38.5, 34.4, 20, 7.7, 17.8, 18, 23.8, 21.8, 29.9, 37.5, 36.7, 
23.2, 13.7, 19, 19.8, 27, 20.5, 27.4, 36.4, 38, 23.9, 9.8, 17.5, 
20.9, 25.5, 21.5, 28.3, 31.9, 40, 18.6, 8.4, 15.7, 21.6, 20.5, 
23.9, 29, 31.7, 39.7, 20.5, 8.5, 9.6, 21.2, 23.3, 25.2, 32.2, 
36.3, 38.9, 22.2, 5.7, 9.7, 19, 25.1, 25.1, 34.2, 32.5, 39, 9.1, 
9.8, 20.7, 27.8, 25.1, 37, 31.9, 37.8, 9.2, 11.4, 20.7, 28.9, 
17.9, 37, 32.9, 31.5, 8.6, 6.7, 19.9, 30.7, 21.5, 34.9, 34.2, 
23.8, 9.3, 8.9, 22.9, 30.9, 18.5, 34.9, 34, 27.2, 5.9, 25.2, 
25.5, 23.5, 36.6, 36.6, 28.9, 8.2, 22, 24.2, 23.2, 29.3, 36.8, 
27.8, 10.9, 20.9, 25.2, 36.6, 31.4), p05tmin = c(`5%` = -3, `5%` = -2.4, 
`5%` = -1.3, `5%` = 1.8, `5%` = 3.8, `5%` = 7.5, `5%` = 11.8, 
`5%` = 14.1, `5%` = 11.8, `5%` = -3, `5%` = -2.4, `5%` = -1.2, 
`5%` = 1.8, `5%` = 3.8, `5%` = 7.6, `5%` = 11.9, `5%` = 14.1, 
`5%` = 11.6, `5%` = -3, `5%` = -2.4, `5%` = -1, `5%` = 1.9, `5%` = 4, 
`5%` = 7.8, `5%` = 12, `5%` = 14.2, `5%` = 11.4, `5%` = -3, `5%` = -2.4, 
`5%` = -1, `5%` = 2, `5%` = 4.1, `5%` = 8, `5%` = 12, `5%` = 14.1, 
`5%` = 11.2, `5%` = -3, `5%` = -2.4, `5%` = -1, `5%` = 2, `5%` = 4.2, 
`5%` = 8.3, `5%` = 12.2, `5%` = 14.1, `5%` = 11.1, `5%` = -2.8, 
`5%` = -2.4, `5%` = -0.9, `5%` = 2, `5%` = 4.2, `5%` = 8.4, `5%` = 12.3, 
`5%` = 14.1, `5%` = 11, `5%` = -2.8, `5%` = -2.4, `5%` = -0.8, 
`5%` = 2, `5%` = 4.4, `5%` = 8.6, `5%` = 12.4, `5%` = 14, `5%` = 10.9, 
`5%` = -2.8, `5%` = -2.4, `5%` = -0.6, `5%` = 2.2, `5%` = 4.4, 
`5%` = 8.7, `5%` = 12.5, `5%` = 14, `5%` = 10.8, `5%` = -2.8, 
`5%` = -2.4, `5%` = -0.5, `5%` = 2.2, `5%` = 4.6, `5%` = 8.8, 
`5%` = 12.7, `5%` = 13.8, `5%` = 10.5, `5%` = -2.8, `5%` = -2.3, 
`5%` = -0.4, `5%` = 2.2, `5%` = 4.6, `5%` = 9, `5%` = 12.8, `5%` = 13.8, 
`5%` = 10.4, `5%` = -2.7, `5%` = -2.3, `5%` = -0.4, `5%` = 2.3, 
`5%` = 4.8, `5%` = 9, `5%` = 12.8, `5%` = 13.7, `5%` = 10.1, 
`5%` = -2.7, `5%` = -2.2, `5%` = -0.2, `5%` = 2.4, `5%` = 4.8, 
`5%` = 9.2, `5%` = 13, `5%` = 13.6, `5%` = 10, `5%` = -2.7, `5%` = -2.2, 
`5%` = 0, `5%` = 2.4, `5%` = 5, `5%` = 9.4, `5%` = 13, `5%` = 13.6, 
`5%` = 9.8, `5%` = -2.6, `5%` = -2.2, `5%` = 0, `5%` = 2.5, `5%` = 5, 
`5%` = 9.5, `5%` = 13, `5%` = 13.6, `5%` = 9.6, `5%` = -2.6, 
`5%` = -2.2, `5%` = 0.1, `5%` = 2.6, `5%` = 5.2, `5%` = 9.8, 
`5%` = 13, `5%` = 13.5, `5%` = 9.5, `5%` = -2.6, `5%` = -2.2, 
`5%` = 0.2, `5%` = 2.6, `5%` = 5.4, `5%` = 9.9, `5%` = 13.1, 
`5%` = 13.4, `5%` = 9.4, `5%` = -2.7, `5%` = -2.1, `5%` = 0.4, 
`5%` = 2.7, `5%` = 5.5, `5%` = 10, `5%` = 13.2, `5%` = 13.3, 
`5%` = 9.2, `5%` = -2.7, `5%` = -2, `5%` = 0.6, `5%` = 2.8, `5%` = 5.6, 
`5%` = 10, `5%` = 13.4, `5%` = 13.2, `5%` = 9.2, `5%` = -2.6, 
`5%` = -2, `5%` = 0.7, `5%` = 2.8, `5%` = 5.8, `5%` = 10.2, `5%` = 13.4, 
`5%` = 13, `5%` = 9, `5%` = -2.6, `5%` = -2, `5%` = 0.8, `5%` = 3, 
`5%` = 5.9, `5%` = 10.3, `5%` = 13.4, `5%` = 13, `5%` = 8.8, 
`5%` = -2.6, `5%` = -2, `5%` = 0.9, `5%` = 3, `5%` = 6, `5%` = 10.5, 
`5%` = 13.5, `5%` = 12.8, `5%` = 8.6, `5%` = -2.6, `5%` = -2, 
`5%` = 1, `5%` = 3, `5%` = 6.2, `5%` = 10.6, `5%` = 13.6, `5%` = 12.7, 
`5%` = 8.4, `5%` = -2.6, `5%` = -1.9, `5%` = 1.1, `5%` = 3.1, 
`5%` = 6.4, `5%` = 10.8, `5%` = 13.6, `5%` = 12.6, `5%` = 8.3, 
`5%` = -2.6, `5%` = -1.8, `5%` = 1.2, `5%` = 3.2, `5%` = 6.6, 
`5%` = 11, `5%` = 13.6, `5%` = 12.6, `5%` = -2.6, `5%` = -1.8, 
`5%` = 1.3, `5%` = 3.2, `5%` = 6.8, `5%` = 11, `5%` = 13.8, `5%` = 12.6, 
`5%` = -2.5, `5%` = -1.7, `5%` = 1.4, `5%` = 3.4, `5%` = 6.9, 
`5%` = 11.2, `5%` = 13.8, `5%` = 12.5, `5%` = -2.5, `5%` = -1.6, 
`5%` = 1.5, `5%` = 3.5, `5%` = 7, `5%` = 11.3, `5%` = 13.9, `5%` = 12.4, 
`5%` = -2.5, `5%` = -1.4, `5%` = 1.6, `5%` = 3.6, `5%` = 7, `5%` = 11.4, 
`5%` = 14, `5%` = 12.3, `5%` = -2.4, `5%` = 1.6, `5%` = 3.7, 
`5%` = 7.2, `5%` = 11.6, `5%` = 14, `5%` = 12.1, `5%` = -2.4, 
`5%` = 1.7, `5%` = 3.8, `5%` = 7.3, `5%` = 11.6, `5%` = 14, `5%` = 12, 
`5%` = -2.4, `5%` = 1.8, `5%` = 7.4, `5%` = 14, `5%` = 11.9), 
    p50tmin = c(`50%` = 2, `50%` = 2.7, `50%` = 4.3, `50%` = 6.7, 
    `50%` = 9, `50%` = 12.8, `50%` = 17.2, `50%` = 18.8, `50%` = 16.8, 
    `50%` = 2, `50%` = 2.8, `50%` = 4.4, `50%` = 6.7, `50%` = 9, 
    `50%` = 13, `50%` = 17.2, `50%` = 18.8, `50%` = 16.7, `50%` = 2, 
    `50%` = 2.8, `50%` = 4.5, `50%` = 6.8, `50%` = 9.2, `50%` = 13.1, 
    `50%` = 17.4, `50%` = 18.8, `50%` = 16.6, `50%` = 2, `50%` = 2.8, 
    `50%` = 4.6, `50%` = 6.8, `50%` = 9.2, `50%` = 13.3, `50%` = 17.4, 
    `50%` = 18.8, `50%` = 16.4, `50%` = 2, `50%` = 2.8, `50%` = 4.7, 
    `50%` = 6.8, `50%` = 9.4, `50%` = 13.4, `50%` = 17.5, `50%` = 18.8, 
    `50%` = 16.3, `50%` = 2, `50%` = 2.9, `50%` = 4.8, `50%` = 6.9, 
    `50%` = 9.5, `50%` = 13.6, `50%` = 17.6, `50%` = 18.7, `50%` = 16.2, 
    `50%` = 2, `50%` = 3, `50%` = 5, `50%` = 7, `50%` = 9.6, 
    `50%` = 13.8, `50%` = 17.7, `50%` = 18.6, `50%` = 16, `50%` = 2, 
    `50%` = 3, `50%` = 5, `50%` = 7, `50%` = 9.8, `50%` = 14, 
    `50%` = 17.8, `50%` = 18.6, `50%` = 16, `50%` = 2, `50%` = 3, 
    `50%` = 5.1, `50%` = 7, `50%` = 9.9, `50%` = 14.1, `50%` = 17.8, 
    `50%` = 18.6, `50%` = 15.8, `50%` = 2, `50%` = 3, `50%` = 5.2, 
    `50%` = 7.1, `50%` = 10, `50%` = 14.2, `50%` = 17.9, `50%` = 18.5, 
    `50%` = 15.7, `50%` = 2, `50%` = 3.1, `50%` = 5.2, `50%` = 7.2, 
    `50%` = 10.1, `50%` = 14.4, `50%` = 18, `50%` = 18.5, `50%` = 15.6, 
    `50%` = 2, `50%` = 3.2, `50%` = 5.3, `50%` = 7.2, `50%` = 10.2, 
    `50%` = 14.6, `50%` = 18, `50%` = 18.4, `50%` = 15.5, `50%` = 2, 
    `50%` = 3.2, `50%` = 5.4, `50%` = 7.2, `50%` = 10.4, `50%` = 14.8, 
    `50%` = 18.1, `50%` = 18.3, `50%` = 15.3, `50%` = 2, `50%` = 3.2, 
    `50%` = 5.4, `50%` = 7.3, `50%` = 10.5, `50%` = 15, `50%` = 18.2, 
    `50%` = 18.2, `50%` = 15.2, `50%` = 2.1, `50%` = 3.4, `50%` = 5.5, 
    `50%` = 7.4, `50%` = 10.6, `50%` = 15, `50%` = 18.3, `50%` = 18.2, 
    `50%` = 15, `50%` = 2.2, `50%` = 3.4, `50%` = 5.6, `50%` = 7.4, 
    `50%` = 10.8, `50%` = 15.2, `50%` = 18.4, `50%` = 18, `50%` = 14.9, 
    `50%` = 2.2, `50%` = 3.4, `50%` = 5.7, `50%` = 7.5, `50%` = 11, 
    `50%` = 15.4, `50%` = 18.4, `50%` = 18, `50%` = 14.8, `50%` = 2.2, 
    `50%` = 3.5, `50%` = 5.8, `50%` = 7.5, `50%` = 11.1, `50%` = 15.5, 
    `50%` = 18.4, `50%` = 18, `50%` = 14.6, `50%` = 2.2, `50%` = 3.6, 
    `50%` = 5.8, `50%` = 7.6, `50%` = 11.2, `50%` = 15.6, `50%` = 18.5, 
    `50%` = 18, `50%` = 14.4, `50%` = 2.3, `50%` = 3.6, `50%` = 5.9, 
    `50%` = 7.6, `50%` = 11.4, `50%` = 15.8, `50%` = 18.5, `50%` = 17.9, 
    `50%` = 14.3, `50%` = 2.4, `50%` = 3.7, `50%` = 6, `50%` = 7.8, 
    `50%` = 11.6, `50%` = 15.9, `50%` = 18.6, `50%` = 17.8, `50%` = 14.2, 
    `50%` = 2.4, `50%` = 3.8, `50%` = 6, `50%` = 7.8, `50%` = 11.8, 
    `50%` = 16, `50%` = 18.6, `50%` = 17.7, `50%` = 14, `50%` = 2.4, 
    `50%` = 3.8, `50%` = 6, `50%` = 8, `50%` = 11.9, `50%` = 16.2, 
    `50%` = 18.6, `50%` = 17.6, `50%` = 13.8, `50%` = 2.5, `50%` = 3.9, 
    `50%` = 6.2, `50%` = 8, `50%` = 12, `50%` = 16.3, `50%` = 18.6, 
    `50%` = 17.6, `50%` = 2.5, `50%` = 4, `50%` = 6.2, `50%` = 8.2, 
    `50%` = 12, `50%` = 16.4, `50%` = 18.6, `50%` = 17.5, `50%` = 2.6, 
    `50%` = 4, `50%` = 6.4, `50%` = 8.2, `50%` = 12.2, `50%` = 16.6, 
    `50%` = 18.6, `50%` = 17.5, `50%` = 2.6, `50%` = 4.1, `50%` = 6.4, 
    `50%` = 8.4, `50%` = 12.2, `50%` = 16.8, `50%` = 18.7, `50%` = 17.4, 
    `50%` = 2.6, `50%` = 4.2, `50%` = 6.4, `50%` = 8.5, `50%` = 12.4, 
    `50%` = 16.9, `50%` = 18.6, `50%` = 17.3, `50%` = 2.6, `50%` = 6.4, 
    `50%` = 8.6, `50%` = 12.5, `50%` = 17, `50%` = 18.7, `50%` = 17.2, 
    `50%` = 2.7, `50%` = 6.5, `50%` = 8.8, `50%` = 12.6, `50%` = 17, 
    `50%` = 18.7, `50%` = 17, `50%` = 2.7, `50%` = 6.6, `50%` = 12.7, 
    `50%` = 18.7, `50%` = 17), p95tmin = c(`95%` = 7.8, `95%` = 7.6, 
    `95%` = 8.8, `95%` = 11, `95%` = 14.5, `95%` = 18.6, `95%` = 22, 
    `95%` = 23, `95%` = 21.2, `95%` = 7.8, `95%` = 7.6, `95%` = 8.9, 
    `95%` = 11, `95%` = 14.6, `95%` = 18.6, `95%` = 22, `95%` = 23, 
    `95%` = 21.1, `95%` = 7.7, `95%` = 7.6, `95%` = 9, `95%` = 11, 
    `95%` = 14.8, `95%` = 18.8, `95%` = 22.2, `95%` = 22.8, `95%` = 21, 
    `95%` = 7.7, `95%` = 7.6, `95%` = 9, `95%` = 11.1, `95%` = 15, 
    `95%` = 18.9, `95%` = 22.3, `95%` = 22.8, `95%` = 20.8, `95%` = 7.6, 
    `95%` = 7.6, `95%` = 9, `95%` = 11.2, `95%` = 15, `95%` = 19.1, 
    `95%` = 22.4, `95%` = 22.8, `95%` = 20.6, `95%` = 7.6, `95%` = 7.7, 
    `95%` = 9.2, `95%` = 11.3, `95%` = 15, `95%` = 19.2, `95%` = 22.4, 
    `95%` = 22.8, `95%` = 20.5, `95%` = 7.5, `95%` = 7.7, `95%` = 9.2, 
    `95%` = 11.4, `95%` = 15.2, `95%` = 19.4, `95%` = 22.5, `95%` = 22.7, 
    `95%` = 20.4, `95%` = 7.5, `95%` = 7.8, `95%` = 9.4, `95%` = 11.4, 
    `95%` = 15.4, `95%` = 19.6, `95%` = 22.6, `95%` = 22.7, `95%` = 20.4, 
    `95%` = 7.5, `95%` = 7.8, `95%` = 9.4, `95%` = 11.5, `95%` = 15.6, 
    `95%` = 19.8, `95%` = 22.6, `95%` = 22.7, `95%` = 20.2, `95%` = 7.5, 
    `95%` = 7.8, `95%` = 9.5, `95%` = 11.6, `95%` = 15.7, `95%` = 19.9, 
    `95%` = 22.6, `95%` = 22.6, `95%` = 20.1, `95%` = 7.5, `95%` = 7.8, 
    `95%` = 9.6, `95%` = 11.7, `95%` = 15.8, `95%` = 20, `95%` = 22.7, 
    `95%` = 22.6, `95%` = 20, `95%` = 7.6, `95%` = 7.7, `95%` = 9.6, 
    `95%` = 11.8, `95%` = 16, `95%` = 20.2, `95%` = 22.7, `95%` = 22.6, 
    `95%` = 19.9, `95%` = 7.6, `95%` = 7.8, `95%` = 9.6, `95%` = 11.9, 
    `95%` = 16.1, `95%` = 20.4, `95%` = 22.7, `95%` = 22.5, `95%` = 19.8, 
    `95%` = 7.6, `95%` = 7.8, `95%` = 9.6, `95%` = 12, `95%` = 16.2, 
    `95%` = 20.6, `95%` = 22.8, `95%` = 22.5, `95%` = 19.6, `95%` = 7.6, 
    `95%` = 7.8, `95%` = 9.7, `95%` = 12, `95%` = 16.4, `95%` = 20.7, 
    `95%` = 22.8, `95%` = 22.4, `95%` = 19.5, `95%` = 7.5, `95%` = 8, 
    `95%` = 9.8, `95%` = 12.2, `95%` = 16.5, `95%` = 20.8, `95%` = 22.8, 
    `95%` = 22.4, `95%` = 19.4, `95%` = 7.5, `95%` = 8, `95%` = 9.8, 
    `95%` = 12.3, `95%` = 16.6, `95%` = 20.9, `95%` = 22.8, `95%` = 22.3, 
    `95%` = 19.4, `95%` = 7.6, `95%` = 8, `95%` = 10, `95%` = 12.4, 
    `95%` = 16.8, `95%` = 21, `95%` = 22.8, `95%` = 22.2, `95%` = 19.3, 
    `95%` = 7.5, `95%` = 8.1, `95%` = 10, `95%` = 12.6, `95%` = 17, 
    `95%` = 21, `95%` = 23, `95%` = 22.2, `95%` = 19.2, `95%` = 7.6, 
    `95%` = 8.2, `95%` = 10, `95%` = 12.7, `95%` = 17, `95%` = 21.1, 
    `95%` = 23, `95%` = 22.1, `95%` = 19, `95%` = 7.6, `95%` = 8.2, 
    `95%` = 10.1, `95%` = 12.9, `95%` = 17.2, `95%` = 21.2, `95%` = 23, 
    `95%` = 22, `95%` = 18.8, `95%` = 7.6, `95%` = 8.3, `95%` = 10.2, 
    `95%` = 13, `95%` = 17.2, `95%` = 21.2, `95%` = 23, `95%` = 22, 
    `95%` = 18.8, `95%` = 7.5, `95%` = 8.4, `95%` = 10.3, `95%` = 13.2, 
    `95%` = 17.4, `95%` = 21.4, `95%` = 23, `95%` = 21.8, `95%` = 18.6, 
    `95%` = 7.5, `95%` = 8.4, `95%` = 10.4, `95%` = 13.4, `95%` = 17.5, 
    `95%` = 21.5, `95%` = 23, `95%` = 21.8, `95%` = 7.5, `95%` = 8.5, 
    `95%` = 10.4, `95%` = 13.5, `95%` = 17.6, `95%` = 21.6, `95%` = 23, 
    `95%` = 21.7, `95%` = 7.4, `95%` = 8.6, `95%` = 10.4, `95%` = 13.8, 
    `95%` = 17.8, `95%` = 21.6, `95%` = 23, `95%` = 21.6, `95%` = 7.5, 
    `95%` = 8.6, `95%` = 10.5, `95%` = 14, `95%` = 17.9, `95%` = 21.8, 
    `95%` = 23, `95%` = 21.6, `95%` = 7.4, `95%` = 8.7, `95%` = 10.5, 
    `95%` = 14, `95%` = 18, `95%` = 21.8, `95%` = 23, `95%` = 21.5, 
    `95%` = 7.5, `95%` = 10.6, `95%` = 14.2, `95%` = 18.2, `95%` = 21.9, 
    `95%` = 23, `95%` = 21.5, `95%` = 7.6, `95%` = 10.6, `95%` = 14.4, 
    `95%` = 18.4, `95%` = 22, `95%` = 23, `95%` = 21.4, `95%` = 7.6, 
    `95%` = 10.8, `95%` = 18.5, `95%` = 23, `95%` = 21.3), p05tmax = c(`5%` = 3.6, 
    `5%` = 5, `5%` = 6.9, `5%` = 10.4, `5%` = 12.8, `5%` = 16.6, 
    `5%` = 22.5, `5%` = 26, `5%` = 21.8, `5%` = 3.6, `5%` = 5, 
    `5%` = 7.1, `5%` = 10.5, `5%` = 12.8, `5%` = 16.8, `5%` = 22.7, 
    `5%` = 26, `5%` = 21.4, `5%` = 3.6, `5%` = 5.1, `5%` = 7.2, 
    `5%` = 10.6, `5%` = 12.8, `5%` = 17, `5%` = 23, `5%` = 26, 
    `5%` = 21.2, `5%` = 3.6, `5%` = 5.1, `5%` = 7.2, `5%` = 10.6, 
    `5%` = 13, `5%` = 17.1, `5%` = 23.1, `5%` = 26, `5%` = 21, 
    `5%` = 3.6, `5%` = 5.1, `5%` = 7.3, `5%` = 10.6, `5%` = 13, 
    `5%` = 17.4, `5%` = 23.2, `5%` = 25.8, `5%` = 21, `5%` = 3.6, 
    `5%` = 5.1, `5%` = 7.4, `5%` = 10.8, `5%` = 13.2, `5%` = 17.6, 
    `5%` = 23.3, `5%` = 25.7, `5%` = 20.7, `5%` = 3.6, `5%` = 5.2, 
    `5%` = 7.5, `5%` = 10.8, `5%` = 13.3, `5%` = 17.7, `5%` = 23.5, 
    `5%` = 25.5, `5%` = 20.6, `5%` = 3.6, `5%` = 5.2, `5%` = 7.6, 
    `5%` = 10.9, `5%` = 13.4, `5%` = 17.9, `5%` = 23.6, `5%` = 25.4, 
    `5%` = 20.3, `5%` = 3.6, `5%` = 5.3, `5%` = 7.8, `5%` = 11, 
    `5%` = 13.5, `5%` = 18, `5%` = 23.9, `5%` = 25.4, `5%` = 20.2, 
    `5%` = 3.6, `5%` = 5.4, `5%` = 7.9, `5%` = 11, `5%` = 13.6, 
    `5%` = 18.3, `5%` = 24, `5%` = 25.2, `5%` = 20, `5%` = 3.6, 
    `5%` = 5.5, `5%` = 8, `5%` = 11.1, `5%` = 13.6, `5%` = 18.5, 
    `5%` = 24.2, `5%` = 25.1, `5%` = 19.6, `5%` = 3.6, `5%` = 5.6, 
    `5%` = 8.2, `5%` = 11.2, `5%` = 13.7, `5%` = 18.6, `5%` = 24.4, 
    `5%` = 25, `5%` = 19.4, `5%` = 3.6, `5%` = 5.6, `5%` = 8.4, 
    `5%` = 11.2, `5%` = 13.8, `5%` = 18.8, `5%` = 24.5, `5%` = 24.9, 
    `5%` = 19.2, `5%` = 3.6, `5%` = 5.6, `5%` = 8.5, `5%` = 11.3, 
    `5%` = 14, `5%` = 19, `5%` = 24.6, `5%` = 24.7, `5%` = 18.9, 
    `5%` = 3.6, `5%` = 5.7, `5%` = 8.7, `5%` = 11.4, `5%` = 14.2, 
    `5%` = 19.2, `5%` = 24.6, `5%` = 24.6, `5%` = 18.8, `5%` = 3.6, 
    `5%` = 5.7, `5%` = 8.9, `5%` = 11.4, `5%` = 14.4, `5%` = 19.3, 
    `5%` = 24.8, `5%` = 24.4, `5%` = 18.6, `5%` = 3.7, `5%` = 5.8, 
    `5%` = 9, `5%` = 11.5, `5%` = 14.4, `5%` = 19.5, `5%` = 25, 
    `5%` = 24.3, `5%` = 18.4, `5%` = 3.7, `5%` = 5.9, `5%` = 9.1, 
    `5%` = 11.5, `5%` = 14.5, `5%` = 19.6, `5%` = 25.3, `5%` = 24.2, 
    `5%` = 18.2, `5%` = 3.7, `5%` = 6, `5%` = 9.2, `5%` = 11.6, 
    `5%` = 14.7, `5%` = 19.8, `5%` = 25.4, `5%` = 24, `5%` = 18, 
    `5%` = 3.8, `5%` = 6.1, `5%` = 9.3, `5%` = 11.8, `5%` = 14.8, 
    `5%` = 20, `5%` = 25.5, `5%` = 23.8, `5%` = 17.7, `5%` = 4, 
    `5%` = 6.1, `5%` = 9.4, `5%` = 12, `5%` = 15.1, `5%` = 20.2, 
    `5%` = 25.6, `5%` = 23.6, `5%` = 17.4, `5%` = 4, `5%` = 6.2, 
    `5%` = 9.4, `5%` = 12, `5%` = 15.2, `5%` = 20.4, `5%` = 25.8, 
    `5%` = 23.4, `5%` = 17.2, `5%` = 4.1, `5%` = 6.2, `5%` = 9.6, 
    `5%` = 12, `5%` = 15.5, `5%` = 20.6, `5%` = 25.8, `5%` = 23.3, 
    `5%` = 17, `5%` = 4.2, `5%` = 6.3, `5%` = 9.6, `5%` = 12.2, 
    `5%` = 15.7, `5%` = 21, `5%` = 25.8, `5%` = 23.2, `5%` = 4.2, 
    `5%` = 6.4, `5%` = 9.8, `5%` = 12.3, `5%` = 15.8, `5%` = 21.2, 
    `5%` = 25.8, `5%` = 23, `5%` = 4.3, `5%` = 6.5, `5%` = 10, 
    `5%` = 12.4, `5%` = 15.9, `5%` = 21.5, `5%` = 25.8, `5%` = 23, 
    `5%` = 4.4, `5%` = 6.6, `5%` = 10, `5%` = 12.5, `5%` = 16, 
    `5%` = 21.6, `5%` = 25.8, `5%` = 22.8, `5%` = 4.6, `5%` = 6.7, 
    `5%` = 10.2, `5%` = 12.5, `5%` = 16.2, `5%` = 22, `5%` = 25.9, 
    `5%` = 22.5, `5%` = 4.6, `5%` = 10.3, `5%` = 12.6, `5%` = 16.3, 
    `5%` = 22, `5%` = 26, `5%` = 22.4, `5%` = 4.8, `5%` = 10.4, 
    `5%` = 12.7, `5%` = 16.4, `5%` = 22.3, `5%` = 26, `5%` = 22.2, 
    `5%` = 4.9, `5%` = 10.4, `5%` = 16.6, `5%` = 26, `5%` = 22
    ), p50tmax = c(`50%` = 9.1, `50%` = 10.4, `50%` = 13, `50%` = 16.5, 
    `50%` = 19.6, `50%` = 24.5, `50%` = 30.2, `50%` = 32, `50%` = 29.1, 
    `50%` = 9.1, `50%` = 10.5, `50%` = 13.2, `50%` = 16.6, `50%` = 19.7, 
    `50%` = 24.7, `50%` = 30.3, `50%` = 32, `50%` = 28.9, `50%` = 9.1, 
    `50%` = 10.6, `50%` = 13.3, `50%` = 16.6, `50%` = 19.9, `50%` = 25, 
    `50%` = 30.5, `50%` = 32, `50%` = 28.6, `50%` = 9.2, `50%` = 10.6, 
    `50%` = 13.4, `50%` = 16.8, `50%` = 20, `50%` = 25.2, `50%` = 30.6, 
    `50%` = 32, `50%` = 28.5, `50%` = 9.2, `50%` = 10.7, `50%` = 13.6, 
    `50%` = 16.8, `50%` = 20.1, `50%` = 25.4, `50%` = 30.6, `50%` = 32, 
    `50%` = 28.3, `50%` = 9.2, `50%` = 10.8, `50%` = 13.7, `50%` = 17, 
    `50%` = 20.3, `50%` = 25.6, `50%` = 30.8, `50%` = 32, `50%` = 28.1, 
    `50%` = 9.2, `50%` = 11, `50%` = 13.8, `50%` = 17, `50%` = 20.5, 
    `50%` = 25.8, `50%` = 31, `50%` = 31.8, `50%` = 28, `50%` = 9.2, 
    `50%` = 11, `50%` = 14, `50%` = 17.1, `50%` = 20.6, `50%` = 26, 
    `50%` = 31, `50%` = 31.8, `50%` = 27.7, `50%` = 9.2, `50%` = 11, 
    `50%` = 14, `50%` = 17.2, `50%` = 20.9, `50%` = 26.2, `50%` = 31, 
    `50%` = 31.7, `50%` = 27.5, `50%` = 9.3, `50%` = 11.2, `50%` = 14.2, 
    `50%` = 17.4, `50%` = 21, `50%` = 26.5, `50%` = 31.2, `50%` = 31.6, 
    `50%` = 27.3, `50%` = 9.3, `50%` = 11.2, `50%` = 14.3, `50%` = 17.5, 
    `50%` = 21.2, `50%` = 26.6, `50%` = 31.3, `50%` = 31.5, `50%` = 27, 
    `50%` = 9.4, `50%` = 11.3, `50%` = 14.4, `50%` = 17.6, `50%` = 21.4, 
    `50%` = 27, `50%` = 31.4, `50%` = 31.4, `50%` = 26.8, `50%` = 9.4, 
    `50%` = 11.3, `50%` = 14.6, `50%` = 17.7, `50%` = 21.6, `50%` = 27.1, 
    `50%` = 31.5, `50%` = 31.4, `50%` = 26.6, `50%` = 9.4, `50%` = 11.4, 
    `50%` = 14.7, `50%` = 17.8, `50%` = 21.8, `50%` = 27.3, `50%` = 31.6, 
    `50%` = 31.2, `50%` = 26.4, `50%` = 9.5, `50%` = 11.5, `50%` = 14.8, 
    `50%` = 17.9, `50%` = 22, `50%` = 27.5, `50%` = 31.6, `50%` = 31.1, 
    `50%` = 26.2, `50%` = 9.5, `50%` = 11.6, `50%` = 15, `50%` = 18, 
    `50%` = 22.1, `50%` = 27.7, `50%` = 31.7, `50%` = 31, `50%` = 26, 
    `50%` = 9.6, `50%` = 11.6, `50%` = 15, `50%` = 18, `50%` = 22.4, 
    `50%` = 28, `50%` = 31.8, `50%` = 31, `50%` = 25.7, `50%` = 9.6, 
    `50%` = 11.8, `50%` = 15.2, `50%` = 18.1, `50%` = 22.5, `50%` = 28, 
    `50%` = 31.8, `50%` = 30.8, `50%` = 25.5, `50%` = 9.6, `50%` = 11.8, 
    `50%` = 15.2, `50%` = 18.2, `50%` = 22.7, `50%` = 28.2, `50%` = 31.8, 
    `50%` = 30.8, `50%` = 25.2, `50%` = 9.7, `50%` = 12, `50%` = 15.3, 
    `50%` = 18.3, `50%` = 22.9, `50%` = 28.4, `50%` = 32, `50%` = 30.6, 
    `50%` = 25, `50%` = 9.8, `50%` = 12, `50%` = 15.4, `50%` = 18.4, 
    `50%` = 23, `50%` = 28.6, `50%` = 32, `50%` = 30.6, `50%` = 24.8, 
    `50%` = 9.8, `50%` = 12, `50%` = 15.5, `50%` = 18.5, `50%` = 23, 
    `50%` = 28.8, `50%` = 32, `50%` = 30.5, `50%` = 24.6, `50%` = 10, 
    `50%` = 12.2, `50%` = 15.6, `50%` = 18.6, `50%` = 23.2, `50%` = 29, 
    `50%` = 32, `50%` = 30.4, `50%` = 24.5, `50%` = 10, `50%` = 12.3, 
    `50%` = 15.7, `50%` = 18.8, `50%` = 23.3, `50%` = 29, `50%` = 32, 
    `50%` = 30.3, `50%` = 10, `50%` = 12.4, `50%` = 15.8, `50%` = 18.9, 
    `50%` = 23.4, `50%` = 29.2, `50%` = 32, `50%` = 30.2, `50%` = 10.1, 
    `50%` = 12.5, `50%` = 16, `50%` = 19, `50%` = 23.6, `50%` = 29.4, 
    `50%` = 32, `50%` = 30, `50%` = 10.2, `50%` = 12.7, `50%` = 16, 
    `50%` = 19.1, `50%` = 23.7, `50%` = 29.6, `50%` = 32, `50%` = 29.9, 
    `50%` = 10.2, `50%` = 12.8, `50%` = 16.1, `50%` = 19.3, `50%` = 23.9, 
    `50%` = 29.7, `50%` = 32, `50%` = 29.8, `50%` = 10.3, `50%` = 16.2, 
    `50%` = 19.4, `50%` = 24, `50%` = 29.9, `50%` = 32, `50%` = 29.6, 
    `50%` = 10.4, `50%` = 16.3, `50%` = 19.6, `50%` = 24.2, `50%` = 30, 
    `50%` = 32, `50%` = 29.5, `50%` = 10.4, `50%` = 16.4, `50%` = 24.3, 
    `50%` = 32, `50%` = 29.3), p95tmax = c(`95%` = 13.7, `95%` = 15.7, 
    `95%` = 19.9, `95%` = 23.7, `95%` = 27.6, `95%` = 32, `95%` = 35.9, 
    `95%` = 36.8, `95%` = 34.6, `95%` = 13.7, `95%` = 16, `95%` = 20, 
    `95%` = 23.8, `95%` = 27.8, `95%` = 32.2, `95%` = 36, `95%` = 36.8, 
    `95%` = 34.5, `95%` = 13.7, `95%` = 16, `95%` = 20.2, `95%` = 24, 
    `95%` = 28, `95%` = 32.4, `95%` = 36, `95%` = 36.8, `95%` = 34.4, 
    `95%` = 13.7, `95%` = 16.1, `95%` = 20.3, `95%` = 24, `95%` = 28.1, 
    `95%` = 32.5, `95%` = 36.2, `95%` = 36.8, `95%` = 34.2, `95%` = 13.7, 
    `95%` = 16.2, `95%` = 20.5, `95%` = 24, `95%` = 28.2, `95%` = 32.6, 
    `95%` = 36.3, `95%` = 36.7, `95%` = 34, `95%` = 13.7, `95%` = 16.4, 
    `95%` = 20.8, `95%` = 24.1, `95%` = 28.3, `95%` = 32.8, `95%` = 36.4, 
    `95%` = 36.7, `95%` = 34, `95%` = 13.8, `95%` = 16.5, `95%` = 20.9, 
    `95%` = 24.2, `95%` = 28.4, `95%` = 33, `95%` = 36.5, `95%` = 36.7, 
    `95%` = 33.7, `95%` = 13.8, `95%` = 16.6, `95%` = 21, `95%` = 24.4, 
    `95%` = 28.5, `95%` = 33.3, `95%` = 36.5, `95%` = 36.7, `95%` = 33.6, 
    `95%` = 13.8, `95%` = 16.7, `95%` = 21.2, `95%` = 24.4, `95%` = 28.6, 
    `95%` = 33.5, `95%` = 36.6, `95%` = 36.7, `95%` = 33.4, `95%` = 13.9, 
    `95%` = 16.8, `95%` = 21.4, `95%` = 24.5, `95%` = 28.8, `95%` = 33.6, 
    `95%` = 36.6, `95%` = 36.6, `95%` = 33.2, `95%` = 14, `95%` = 16.9, 
    `95%` = 21.5, `95%` = 24.6, `95%` = 29, `95%` = 33.7, `95%` = 36.6, 
    `95%` = 36.6, `95%` = 33.1, `95%` = 14, `95%` = 17, `95%` = 21.6, 
    `95%` = 24.8, `95%` = 29.2, `95%` = 34, `95%` = 36.7, `95%` = 36.6, 
    `95%` = 33, `95%` = 14, `95%` = 17.1, `95%` = 21.6, `95%` = 25, 
    `95%` = 29.4, `95%` = 34.1, `95%` = 36.7, `95%` = 36.5, `95%` = 32.8, 
    `95%` = 14.1, `95%` = 17.3, `95%` = 21.7, `95%` = 25, `95%` = 29.5, 
    `95%` = 34.2, `95%` = 36.8, `95%` = 36.4, `95%` = 32.6, `95%` = 14.2, 
    `95%` = 17.4, `95%` = 21.8, `95%` = 25.2, `95%` = 29.8, `95%` = 34.3, 
    `95%` = 36.8, `95%` = 36.3, `95%` = 32.5, `95%` = 14.2, `95%` = 17.6, 
    `95%` = 22, `95%` = 25.4, `95%` = 30, `95%` = 34.4, `95%` = 36.8, 
    `95%` = 36.3, `95%` = 32.4, `95%` = 14.4, `95%` = 18, `95%` = 22, 
    `95%` = 25.5, `95%` = 30.1, `95%` = 34.5, `95%` = 36.8, `95%` = 36.2, 
    `95%` = 32.2, `95%` = 14.4, `95%` = 18, `95%` = 22.1, `95%` = 25.6, 
    `95%` = 30.3, `95%` = 34.6, `95%` = 36.8, `95%` = 36.1, `95%` = 32, 
    `95%` = 14.5, `95%` = 18.2, `95%` = 22.2, `95%` = 25.8, `95%` = 30.4, 
    `95%` = 34.8, `95%` = 36.9, `95%` = 36, `95%` = 32, `95%` = 14.6, 
    `95%` = 18.3, `95%` = 22.3, `95%` = 26, `95%` = 30.5, `95%` = 35, 
    `95%` = 37, `95%` = 35.9, `95%` = 31.8, `95%` = 14.6, `95%` = 18.4, 
    `95%` = 22.4, `95%` = 26, `95%` = 30.6, `95%` = 35, `95%` = 37, 
    `95%` = 35.7, `95%` = 31.6, `95%` = 14.8, `95%` = 18.5, `95%` = 22.5, 
    `95%` = 26.1, `95%` = 30.6, `95%` = 35, `95%` = 37, `95%` = 35.6, 
    `95%` = 31.3, `95%` = 14.9, `95%` = 18.7, `95%` = 22.6, `95%` = 26.3, 
    `95%` = 30.8, `95%` = 35.1, `95%` = 37, `95%` = 35.5, `95%` = 31, 
    `95%` = 15, `95%` = 19, `95%` = 22.7, `95%` = 26.5, `95%` = 31, 
    `95%` = 35.2, `95%` = 37, `95%` = 35.5, `95%` = 15, `95%` = 19.2, 
    `95%` = 22.9, `95%` = 26.7, `95%` = 31.1, `95%` = 35.4, `95%` = 37, 
    `95%` = 35.4, `95%` = 15.1, `95%` = 19.4, `95%` = 23, `95%` = 26.8, 
    `95%` = 31.2, `95%` = 35.5, `95%` = 37, `95%` = 35.3, `95%` = 15.2, 
    `95%` = 19.5, `95%` = 23, `95%` = 27, `95%` = 31.4, `95%` = 35.6, 
    `95%` = 37, `95%` = 35.1, `95%` = 15.3, `95%` = 19.7, `95%` = 23.2, 
    `95%` = 27.2, `95%` = 31.6, `95%` = 35.6, `95%` = 37, `95%` = 35, 
    `95%` = 15.4, `95%` = 23.2, `95%` = 27.4, `95%` = 31.7, `95%` = 35.7, 
    `95%` = 36.9, `95%` = 35, `95%` = 15.5, `95%` = 23.4, `95%` = 27.5, 
    `95%` = 31.8, `95%` = 35.8, `95%` = 36.9, `95%` = 35, `95%` = 15.6, 
    `95%` = 23.5, `95%` = 32, `95%` = 36.9, `95%` = 34.8)), row.names = c(NA, 
-266L), class = c("tbl_df", "tbl", "data.frame"))

字符串
我的代码:

ggplot2::ggplot(data = plot_data, aes(x = date)) +
    ggplot2::geom_ribbon(aes(ymin = p05tmax, ymax = p95tmax, fill = "tmax"),
                         alpha = 0.3, color = "#ca0020", linetype = "51", 
                         lineend = "round", linejoin = "round") +
    ggplot2::geom_ribbon(aes(ymin = p05tmin, ymax = p95tmin, fill = "tmin"),
                         alpha = 0.3, color = "#0571b0", linetype = "51", 
                         lineend = "round", linejoin = "round") +
    ggplot2::geom_line(aes(y = tmin, color = "tmin"), linewidth = 0.75, lineend = "round", na.rm = TRUE) +
    ggplot2::geom_line(aes(y = p50tmin, color = "p50tmin"), linewidth = 0.75, linetype = "dotted", lineend = "round", na.rm = TRUE) +
    ggplot2::geom_line(aes(y = tmax, color = "tmax"), linewidth = 0.75, lineend = "round", na.rm = TRUE) +
    ggplot2::geom_line(aes(y = p50tmax, color = "p50tmax"), linewidth = 0.75, linetype = "dotted", lineend = "round", na.rm = TRUE) +


通过我的完整代码和完整数据,我得到了以下图表:

我想要的是添加一些垂直的浅灰色线的主题中的背景,以便更容易区分每个月的数据。我已经在theme_hc中寻找选项,但没有运气
类似这样的东西(为了清楚起见,我想要从2月到3月,从Abr到5月等的灰色线条):

rnmwe5a2

rnmwe5a21#

您可以使用annotate来绘制矩形,xmin值使用一个日期序列,xmax值使用一个偏移1个月的日期序列,以及无限的yminymax值。
你只向我们展示了你的绘图代码的一小部分,所以为了完整起见,我在这里重新创建了你的各种比例和主题元素:

library(tidyverse)

lablist <- list(expression(paste("Daily max temp (2023)")),
                expression(paste("Daily min temp (2023)")),
                expression(Daily~italic(P[50])~
                             paste("max temp (1920-2023)")),
                expression(Daily~italic(P[50])~
                             paste("min temp (1920-2023)")))

plot_data %>%
  rename(datatmin = tmin, datatmax = tmax) %>%
  rename_with(~gsub("(tmin|tmax)", "_\\1", .x)) %>%
  pivot_longer(-date, names_sep = "_", names_to = c(".value", "series")) %>%
  ggplot(aes(x = date)) +
  annotate("rect", ymin = -Inf, ymax = Inf, fill = "gray", alpha = 0.2,
           xmin = seq(as.Date("2023-02-01"), by = "2 month", length = 4),
           xmax = seq(as.Date("2023-03-01"), by = "2 month", length = 4)) +
  geom_ribbon(aes(ymin = p05, ymax = p95, fill = series), linetype = "51",
              alpha = 0.3, lineend = "round", linejoin = "round") +
  geom_line(aes(y = data, linetype = paste("data", series), 
                color = paste("data", series)), 
            linewidth = 0.75, lineend = "round", na.rm = TRUE) +
  geom_line(aes(y = p50, linetype = paste("p50", series),
                color = paste("p50", series)), linewidth = 0.75, 
            lineend = "round", na.rm = TRUE) +
  scale_y_continuous(NULL, breaks = seq(-9, 41, 5), limits = c(-9, 41),
                     labels = ~paste(.x, "\u00b0C")) +
  scale_x_date(NULL, date_breaks = "month", date_labels = "%b") +
  scale_linetype_manual(NULL, values = c(1, 1, 3, 3), labels = lablist) +
  scale_color_manual(NULL, values = rep(c("#cd1532", "#4695c4"), 2),
                     labels = lablist) +
  scale_fill_manual(NULL, values = c("#cd1532", "#4695c4"),
                    labels = list(expression(Daily~italic(P[5]-P[95])~
                                               paste("max temp (1920-2023)")), 
                                  expression(Daily~italic(P[5]-P[95])~
                                               paste("min temp (1920-2023)")))) +
  guides(fill = guide_legend(order = -1)) +
  theme_minimal(base_size = 16) +
  theme(legend.position = c(0.15, 0.8),
        legend.box.background = element_rect(),
        panel.grid.major.x = element_blank(),
        panel.grid.minor.x = element_blank(),
        legend.spacing.y = unit(0, "mm"))

字符串


的数据

相关问题