这是我的数据:
data=structure(c(-0.0471957808923093, -0.0467988635384236, -0.0463342530558707,
-0.0457926330882236, -0.0451638382532273, -0.0444368569264807,
-0.0435998514313549, -0.0426401983500639, -0.0415445516030975,
-0.0402989307802484, -0.0388888369350307, -0.0372993976665075,
-0.0355155428026053, -0.0335222113649458, -0.0313045897396848,
-0.028848380109615, -0.026140097233332, -0.023167390606974, -0.0199193879382963,
-0.0163870547327459, -0.0125635636730607, -0.00844466640840535,
-0.00402905939999997, 0.000681265356828354, 0.00568069455370951,
0.0109597029612447, 0.01650460835736, 0.0222973821907433, 0.0283155256820092,
0.0345320202245192, 0.0409153597579977, 0.0474296712607441, 0.0540349276635842,
0.0606872553679083, 0.0673393362019039, 0.0739409011365642, 0.0804393104801724,
0.0867802126590783, 0.0929082711616744, 0.0987679468617816, 0.104304320836165,
0.109463941032544, 0.114195674804447, 0.11845154847061, 0.122187554726899,
0.125364408967776, 0.127948236372159, 0.12991117296429, 0.131231865742443,
0.131895859325063, 0.131895859325063, 0.131231865742443, 0.12991117296429,
0.127948236372159, 0.125364408967776, 0.122187554726899, 0.11845154847061,
0.114195674804447, 0.109463941032544, 0.104304320836165, 0.0987679468617816,
0.0929082711616744, 0.0867802126590783, 0.0804393104801724, 0.0739409011365642,
0.0673393362019039, 0.0606872553679083, 0.0540349276635841, 0.0474296712607441,
0.0409153597579976, 0.0345320202245192, 0.0283155256820092, 0.0222973821907433,
0.01650460835736, 0.0109597029612447, 0.00568069455370951, 0.000681265356828344,
-0.00402905939999997, -0.00844466640840537, -0.0125635636730607,
-0.0163870547327459, -0.0199193879382963, -0.023167390606974,
-0.026140097233332, -0.028848380109615, -0.0313045897396848,
-0.0335222113649458, -0.0355155428026053, -0.0372993976665075,
-0.0388888369350306, -0.0402989307802484, -0.0415445516030976,
-0.0426401983500639, -0.0435998514313549, -0.0444368569264807,
-0.0451638382532273, -0.0457926330882236, -0.0463342530558707,
-0.0467988635384236, -0.0471957808923093, -169.075778315231,
-165.419424999945, -161.763071684659, -158.106718369373, -154.450365054087,
-150.794011738801, -147.137658423515, -143.481305108229, -139.824951792942,
-136.168598477656, -132.51224516237, -128.855891847084, -125.199538531798,
-121.543185216512, -117.886831901226, -114.23047858594, -110.574125270654,
-106.917771955368, -103.261418640081, -99.6050653247953, -95.9487120095092,
-92.2923586942231, -88.636005378937, -84.9796520636509, -81.3232987483648,
-77.6669454330787, -74.0105921177926, -70.3542388025065, -66.6978854872204,
-63.0415321719343, -59.3851788566482, -55.7288255413621, -52.072472226076,
-48.4161189107899, -44.7597655955038, -41.1034122802177, -37.4470589649316,
-33.7907056496455, -30.1343523343594, -26.4779990190733, -22.8216457037872,
-19.1652923885011, -15.508939073215, -11.8525857579289, -8.19623244264278,
-4.53987912735666, -0.88352581207058, 2.77282750321554, 6.42918081850162,
10.0855341337877, 13.7418874490738, 17.3982407643599, 21.054594079646,
24.7109473949321, 28.3673007102183, 32.0236540255043, 35.6800073407905,
39.3363606560765, 42.9927139713627, 46.6490672866487, 50.3054206019349,
53.9617739172209, 57.6181272325071, 61.2744805477931, 64.9308338630793,
68.5871871783654, 72.2435404936515, 75.8998938089376, 79.5562471242237,
83.2126004395098, 86.8689537547959, 90.525307070082, 94.1816603853681,
97.8380137006542, 101.49436701594, 105.150720331226, 108.807073646513,
112.463426961799, 116.119780277085, 119.776133592371, 123.432486907657,
127.088840222943, 130.745193538229, 134.401546853515, 138.057900168801,
141.714253484087, 145.370606799374, 149.02696011466, 152.683313429946,
156.339666745232, 159.996020060518, 163.652373375804, 167.30872669109,
170.965080006376, 174.621433321662, 178.277786636948, 181.934139952235,
185.590493267521, 189.246846582807, 192.903199898093), .Dim = c(100L,
2L), .Dimnames = list(NULL, c("Y", "X")))
根据这些数据,我可以在下面绘制这张图:
plot(data[,1],data[,2],type="l")
abline(h=quantile(data[,2],0.75))
abline(h=quantile(data[,2],0.25))
使用多边形函数如何在分布尾部和0.75 / 0.25分位数线之间遮蔽区域(使用不同的颜色)?
答案 0 :(得分:1)
答案:
让dat成为你的数据框,
%y