为 pgfplot 添加深色和浅色阴影

为 pgfplot 添加深色和浅色阴影

从下面的代码中,我想让情节看起来像这样:

我怎样才能做到这一点:

在此处输入图片描述

代码

\documentclass{article}
\usepackage{pgfplots}
    \usetikzlibrary{
        pgfplots.fillbetween,
    }
    \pgfplotsset{
        compat=newest,
        /tikz/Node/.style={
            circle,
            draw=white,
        },
        /tikz/Label/.style={
            fill=white,
            fill opacity=0.5,
            text opacity=1,
        },
    }
    
\pgfkeys{/pgf/number format/set thousands separator = } 

\begin{filecontents*}{data_1.txt}
271.625,-44.430466,-44.344466,-77.027512,-97.027512
279.1,-40.153553,-40.069553,-45.784012,-65.784012
286.575,-35.45845,-35.37545,-72.053497,-92.053497
294.05,-30.76335,-30.68135,-98.322983,-118.322983
301.525,-26.068249,-25.988249,-124.592468,-144.592468
309,-21.373146,-21.294146,-150.861954,-170.861954
316.475,-21.453478,-21.375478,-170.093216,-190.093216
323.95,-21.533808,-21.456808,170.675537,150.675537
331.425,-21.61414,-21.53814,151.44429,131.44429
338.9,-21.694469,-21.619469,132.213028,112.213028
346.375,-20.717529,-20.643529,110.217758,90.217758
353.85,-19.740587,-19.668587,88.222488,68.222488
361.325,-18.763647,-18.692647,66.227211,46.227211
368.8,-17.786705,-17.716705,44.231941,24.231941
376.275,-17.141306,-17.072306,29.986397,9.986397
383.75,-16.495905,-16.427905,15.740853,-4.259147
391.225,-15.850505,-15.783505,1.49531,-18.50469
398.7,-15.205106,-15.139106,-12.750235,-32.750235
406.175,-15.289227,-15.224227,-20.324102,-40.324102
413.65,-15.37335,-15.30935,-27.89797,-47.89797
421.125,-15.457473,-15.394473,-35.471836,-55.471836
428.6,-15.541595,-15.479595,-43.045704,-63.045704
436.075,-14.491568,-14.430568,-62.179932,-82.179932
443.55,-13.441539,-13.381539,-81.314156,-101.314156
451.025,-12.391511,-12.332511,-100.44838,-120.44838
458.5,-11.341482,-11.282482,-119.582611,-139.582611
465.975,-10.760789,-10.702789,-131.291519,-151.291519
473.45,-10.180095,-10.123095,-143.000443,-163.000443
480.925,-9.599401,-9.543401,-154.709351,-174.709351
488.4,-9.018707,-8.963707,-166.418259,-186.418259
495.875,-8.462045,-8.408045,-178.806198,-198.806198
503.35,-7.905382,-7.852382,168.805862,148.805862
510.825,-7.348719,-7.296719,156.417938,136.417938
518.3,-6.792057,-6.741057,144.029999,124.029999
525.775,-6.325788,-6.275788,131.39859,111.39859
533.25,-5.859518,-5.809518,118.767189,98.767189
540.725,-5.393249,-5.344249,106.135788,86.135788
548.2,-4.92698,-4.87898,93.504387,73.504387
555.675,-4.612352,-4.565352,80.948051,60.948051
563.15,-4.297724,-4.251724,68.391716,48.391716
570.625,-3.983097,-3.938097,55.835384,35.835384
578.1,-3.668469,-3.624469,43.279053,23.279053
585.575,-3.507614,-3.464614,31.313463,11.313463
593.05,-3.346759,-3.303759,19.347876,-0.652124000000001
600.525,-3.185904,-3.143904,7.382288,-12.617712
608,-3.025048,-2.984048,-4.583299,-24.583299
615.475,-2.862232,-2.822232,-15.743791,-35.743791
622.95,-2.699416,-2.660416,-26.90428,-46.90428
630.425,-2.5366,-2.4976,-38.064774,-58.064774
637.9,-2.373783,-2.335783,-49.225262,-69.225262
645.375,-2.28432,-2.24732,-59.549553,-79.549553
652.85,-2.194857,-2.158857,-69.87384,-89.87384
660.325,-2.105394,-2.070394,-80.198128,-100.198128
667.8,-2.01593,-1.98193,-90.522423,-110.522423
675.275,-1.888474,-1.855474,-101.264984,-121.264984
682.75,-1.761019,-1.729019,-112.007553,-132.007553
690.225,-1.633562,-1.602562,-122.750122,-142.750122
697.7,-1.506107,-1.476107,-133.492691,-153.492691
705.175,-1.431054,-1.402054,-143.252029,-163.252029
712.65,-1.356002,-1.327002,-153.011383,-173.011383
720.125,-1.280949,-1.252949,-162.770737,-182.770737
727.6,-1.205896,-1.178896,-172.530075,-192.530075
735.075,-1.136326,-1.110326,176.918121,156.918121
742.55,-1.066756,-1.041756,166.366318,146.366318
750.025,-0.997184,-0.973184,155.814514,135.814514
757.5,-0.927614,-0.904614,145.262711,125.262711
764.975,-0.881196,-0.859196,135.233322,115.233322
772.45,-0.834777,-0.813777,125.203926,105.203926
779.925,-0.788359,-0.768359,115.174522,95.174522
787.4,-0.741941,-0.721941,105.145126,85.145126
794.875,-0.775948,-0.756948,95.616867,75.616867
802.35,-0.809956,-0.791956,86.088615,66.088615
809.825,-0.843963,-0.826963,76.560356,56.560356
817.3,-0.87797,-0.86197,67.032097,47.032097
824.775,-1.001829,-0.986829,56.125717,36.125717
832.25,-1.125688,-1.111688,45.219334,25.219334
839.725,-1.249547,-1.236547,34.312954,14.312954
847.2,-1.373406,-1.361406,23.40657,3.40657
854.675,-1.521564,-1.510564,14.411652,-5.588348
862.15,-1.669724,-1.659724,5.416731,-14.583269
869.625,-1.817883,-1.808883,-3.578189,-23.578189
877.1,-1.966042,-1.958042,-12.57311,-32.57311
884.575,-2.16186,-2.15486,-21.543835,-41.543835
892.05,-2.357677,-2.351677,-30.514559,-50.514559
899.525,-2.553495,-2.548495,-39.485283,-59.485283
907,-2.749312,-2.745312,-48.456009,-68.456009
914.475,-3.083923,-3.080923,-56.799114,-76.799114
921.95,-3.418534,-3.416534,-65.14222,-85.14222
929.425,-3.753145,-3.751145,-73.485329,-93.485329
936.9,-4.087756,-4.086756,-81.828438,-101.828438
944.375,-4.12428,-4.12528,-88.762917,-108.762917
951.85,-4.160805,-4.162805,-95.697388,-115.697388
959.325,-4.19733,-4.20033,-102.631866,-122.631866
966.8,-4.233855,-4.237855,-109.566345,-129.566345
974.275,-4.542373,-4.547373,-117.301041,-137.301041
981.75,-4.850892,-4.856892,-125.035736,-145.035736
989.225,-5.159409,-5.166409,-132.770432,-152.770432
996.7,-5.467927,-5.475927,-140.505127,-160.505127
1004.175,-5.589142,-5.598142,-120.441521,-140.441521
1011.65,-5.710355,-5.720355,-100.377907,-120.377907
1019.125,-5.83157,-5.84257,-80.314301,-100.314301
1026.6,-5.952784,-5.964784,-60.25069,-80.25069
1034.075,-6.029926,-6.042926,-68.966385,-88.966385
1041.55,-6.107068,-6.121068,-77.682076,-97.682076
1049.025,-6.18421,-6.19921,-86.397766,-106.397766
1056.5,-6.261352,-6.277352,-95.113457,-115.113457
1063.975,-6.433991,-6.450991,-128.028702,-148.028702
1071.45,-6.606629,-6.624629,-160.943939,-180.943939
1078.925,-6.779268,-6.798268,166.140823,146.140823
1086.4,-6.951907,-6.972907,133.225586,113.225586
1093.875,-7.036942,-7.058942,154.995667,134.995667
1101.35,-7.121978,-7.144978,176.765762,156.765762
1108.825,-7.207014,-7.231014,-161.464157,-181.464157
1116.3,-7.29205,-7.31705,-139.694077,-159.694077
1123.775,-7.219203,-7.245203,-145.500702,-165.500702
1131.25,-7.146356,-7.174356,-151.307327,-171.307327
1138.725,-7.07351,-7.10251,-157.113953,-177.113953
1146.2,-7.000663,-7.030663,-162.920578,-182.920578
1153.675,-7.006343,-7.037343,-169.457748,-189.457748
1161.15,-7.012022,-7.044022,-175.994904,-195.994904
1168.625,-7.017702,-7.050702,177.467926,157.467926
1176.1,-7.023382,-7.057382,170.930756,150.930756
1183.575,-7.056529,-7.091529,164.77388,144.77388
1191.05,-7.089675,-7.126675,158.61702,138.61702
1198.525,-7.122821,-7.160821,152.460144,132.460144
1206,-7.155968,-7.194968,146.303284,126.303284
1213.475,-7.209227,-7.249227,138.251312,118.251312
1220.95,-7.262486,-7.303486,130.199341,110.199341
1228.425,-7.315745,-7.358745,122.147385,102.147385
1235.9,-7.369004,-7.413004,114.095421,94.095421
1243.375,-7.473514,-7.518514,106.917778,86.917778
1250.85,-7.578025,-7.624025,99.740135,79.740135
1258.325,-7.682535,-7.729535,92.562492,72.562492
1265.8,-7.787045,-7.835045,85.38485,65.38485
1273.275,-8.050676,-8.100676,78.979874,58.979874
1280.75,-8.314306,-8.365306,72.574898,52.574898
1288.225,-8.577937,-8.629937,66.169922,46.169922
1295.7,-8.841568,-8.894568,59.764946,39.764946
1303.175,-8.72088,-8.77588,54.004936,34.004936
1310.65,-8.600192,-8.656192,48.244923,28.244923
1318.125,-8.479505,-8.536505,42.484913,22.484913
1325.6,-8.358817,-8.416817,36.724899,16.724899
1333.075,-8.439323,-8.498323,-2.420997,-22.420997
1340.55,-8.51983,-8.57983,-41.566895,-61.566895
1348.025,-8.600336,-8.662336,-80.712791,-100.712791
1355.5,-8.680842,-8.743842,-119.858688,-139.858688
1362.975,-8.723989,-8.787989,-94.824768,-114.824768
1370.45,-8.767134,-8.832134,-69.790848,-89.790848
1377.925,-8.810279,-8.877279,-44.756924,-64.756924
1385.4,-8.853424,-8.921424,-19.723003,-39.723003
1392.875,-8.965538,-9.034538,-28.229027,-48.229027
1400.35,-9.077652,-9.147652,-36.735054,-56.735054
1407.825,-9.189766,-9.260766,-45.241074,-65.241074
1415.3,-9.30188,-9.37388,-53.747097,-73.747097
1422.775,-9.383372,-9.457372,-58.93132,-78.93132
1430.25,-9.464864,-9.539864,-64.115547,-84.115547
1437.725,-9.546355,-9.623355,-69.299767,-89.299767
1445.2,-9.627848,-9.705848,-74.483994,-94.483994
1452.675,-9.643953,-9.722953,-80.974388,-100.974388
1460.15,-9.660059,-9.740059,-87.464783,-107.464783
1467.625,-9.676166,-9.758166,-93.955177,-113.955177
1475.1,-9.692271,-9.775271,-100.445572,-120.445572
1482.575,-9.736245,-9.820245,-108.598282,-128.598282
1490.05,-9.780219,-9.865219,-116.750984,-136.750984
1497.525,-9.824193,-9.910193,-124.903694,-144.903694
1505,-9.868166,-9.956166,-133.056396,-153.056396
1512.475,-9.93608,-10.02508,-144.353638,-164.353638
1519.95,-10.003994,-10.093994,-155.650864,-175.650864
1527.425,-10.071907,-10.162907,-166.948105,-186.948105
1534.9,-10.139822,-10.231822,-178.245346,-198.245346
1542.375,-10.287541,-10.381541,175.028809,155.028809
1549.85,-10.43526,-10.53026,168.302963,148.302963
1557.325,-10.58298,-10.67898,161.577103,141.577103
1564.8,-10.730699,-10.828699,154.851257,134.851257
1572.275,-11.091093,-11.190093,110.31086,90.31086
1579.75,-11.451486,-11.551486,65.770462,45.770462
1587.225,-11.81188,-11.91388,21.230072,1.230072
1594.7,-12.172273,-12.275273,-23.310322,-43.310322
1602.175,-12.220288,-12.324288,3.931986,-16.068014
1609.65,-12.268304,-12.373304,31.174294,11.174294
1617.125,-12.316319,-12.422319,58.416603,38.416603
1624.6,-12.364334,-12.471334,85.658913,65.658913
1632.075,-13.123944,-13.231944,40.827946,20.827946
1639.55,-13.883554,-13.993554,-4.003019,-24.003019
1647.025,-14.643164,-14.754164,-48.833988,-68.833988
1654.5,-15.402773,-15.514773,-93.664955,-113.664955
1661.975,-15.33109,-15.44409,-67.502571,-87.502571
1669.45,-15.259406,-15.374406,-41.340187,-61.340187
1676.925,-15.187723,-15.303723,-15.177809,-35.177809
1684.4,-15.11604,-15.23304,10.984571,-9.015429
1691.875,-16.425959,-16.543959,-31.362015,-51.362015
1699.35,-17.735878,-17.855878,-73.708603,-93.708603
1706.825,-19.045797,-19.166797,-116.055191,-136.055191
1714.3,-20.355717,-20.477717,-158.401779,-178.401779
1721.775,-20.892801,-21.016801,-165.995697,-185.995697
1729.25,-21.429884,-21.554884,-173.589615,-193.589615
1736.725,-21.966969,-22.092969,178.816467,158.816467
1744.2,-22.504051,-22.631051,171.222565,151.222565
1751.675,-23.88604,-24.01504,169.38858,149.38858
1759.15,-25.268028,-25.398028,167.554611,147.554611
1766.625,-26.650015,-26.781015,165.720642,145.720642
1774.1,-28.032003,-28.164003,163.886673,143.886673
1781.575,-27.977093,-28.111093,-171.34288,-191.34288
1789.05,-27.92218,-28.05718,-146.572418,-166.572418
1796.525,-27.867268,-28.003268,-121.801949,-141.801949
1804,-27.812357,-27.949357,-97.031487,-117.031487
1811.475,-28.443005,-28.582005,-126.588814,-146.588814
1818.95,-29.073652,-29.213652,-156.146149,-176.146149
1826.425,-29.704302,-29.845302,174.296539,154.296539
1833.9,-30.334949,-30.477949,144.739212,124.739212
1841.375,-30.03405,-30.17805,175.301666,155.301666
1848.85,-29.733149,-29.878149,-154.135864,-174.135864
1856.325,-29.432247,-29.578247,-123.573395,-143.573395
1863.8,-29.131346,-29.278346,-93.010925,-113.010925
1871.275,-28.29183,-28.43983,-131.974503,-151.974503
1878.75,-27.452312,-27.602312,-170.93808,-190.93808
1886.225,-26.612795,-26.763795,150.098343,130.098343
1893.7,-25.773277,-25.925277,111.13475,91.13475
1901.175,-26.276819,-26.429819,142.392273,122.392273
1908.65,-26.780359,-26.934359,173.649796,153.649796
1916.125,-27.283901,-27.439901,-155.092682,-175.092682
1923.6,-27.787441,-27.944441,-123.835152,-143.835152
1931.075,-27.00457,-27.16257,-145.230606,-165.230606
1938.55,-26.221701,-26.380701,-166.626068,-186.626068
1946.025,-25.438829,-25.599829,171.978485,151.978485
1953.5,-24.655958,-24.817958,150.583023,130.583023
1960.975,-24.599928,-24.762928,130.095627,110.095627
1968.45,-24.543898,-24.707898,109.608215,89.608215
1975.925,-24.487865,-24.653865,89.120811,69.120811
1983.4,-24.431833,-24.598833,68.633408,48.633408
1990.875,-24.59479,-24.76279,87.256523,67.256523
1998.35,-24.757746,-24.926746,105.879639,85.879639
2005.825,-24.920702,-25.091702,124.502762,104.502762
2013.3,-25.083658,-25.255658,143.12587,123.12587
2020.775,-24.884739,-25.057739,123.668747,103.668747
2028.25,-24.685822,-24.860822,104.211617,84.211617
2035.725,-24.486904,-24.662904,84.754486,64.754486
2043.2,-24.287987,-24.464987,65.297356,45.297356
2050.675,-24.106863,-24.284863,56.789845,36.789845
2058.15,-23.925739,-24.104739,48.282337,28.282337
2065.625,-23.744616,-23.925616,39.774826,19.774826
2073.1,-23.563492,-23.745492,31.267311,11.267311
2080.575,-24.698532,-24.881532,32.325722,12.325722
2088.05,-25.83357,-26.01757,33.384136,13.384136
2095.525,-26.968609,-27.153609,34.442551,14.442551
2103,-28.103647,-28.289647,35.500965,15.500965
2110.475,-27.659105,-27.846105,24.423372,4.423372
2117.95,-27.214565,-27.403565,13.345781,-6.654219
2125.425,-26.770025,-26.960025,2.26819,-17.73181
2132.9,-26.325485,-26.517485,-8.809402,-28.809402
2140.375,-26.981007,-27.174007,-6.354769,-26.354769
2147.85,-27.636528,-27.830528,-3.900136,-23.900136
2155.325,-28.292049,-28.487049,-1.445503,-21.445503
2162.8,-28.947571,-29.143571,1.00913,-18.99087
2170.275,-29.761808,-29.959808,-34.472237,-54.472237
2177.75,-30.576048,-30.775048,-69.953606,-89.953606
2185.225,-31.390285,-31.590285,-105.434975,-125.434975
2192.7,-32.204525,-32.405525,-140.916336,-160.916336
2200.175,-31.328814,-31.531814,-124.403419,-144.403419
2207.65,-30.453102,-30.657102,-107.890511,-127.890511
2215.125,-29.577391,-29.782391,-91.377594,-111.377594
2222.6,-28.701679,-28.907679,-74.864677,-94.864677
2230.075,-28.580088,-28.787088,-66.300529,-86.300529
2237.55,-28.458494,-28.667494,-57.736382,-77.736382
2245.025,-28.336901,-28.546901,-49.17223,-69.17223
2252.5,-28.215309,-28.426309,-40.608082,-60.608082
2259.975,-28.541567,-28.753567,-84.869469,-104.869469
2267.45,-28.867826,-29.080826,-129.130859,-149.130859
2274.925,-29.194086,-29.409086,-173.392242,-193.392242
2282.4,-29.520346,-29.736346,142.34639,122.34639
2289.875,-28.794601,-29.011601,170.395554,150.395554
2297.35,-28.068857,-28.286857,-161.555298,-181.555298
2304.825,-27.343113,-27.563113,-133.506134,-153.506134
2312.3,-26.617369,-26.838369,-105.456963,-125.456963
2319.775,-26.686768,-26.908768,-109.923836,-129.923836
2327.25,-26.756166,-26.979166,-114.390701,-134.390701
2334.725,-26.825563,-27.049563,-118.857567,-138.857567
2342.2,-26.894962,-27.119962,-123.324432,-143.324432
2349.675,-26.926956,-27.152956,-129.761154,-149.761154
2357.15,-26.958946,-27.186946,-136.197861,-156.197861
2364.625,-26.990938,-27.219938,-142.634567,-162.634567
2372.1,-27.022932,-27.252932,-149.071289,-169.071289
2379.575,-27.464088,-27.695088,-111.700195,-131.700195
2387.05,-27.905247,-28.137247,-74.329109,-94.329109
2394.525,-28.346405,-28.580405,-36.958023,-56.958023
2402,-28.787561,-29.022561,0.413062,-19.586938
2409.475,-28.702703,-28.938703,22.133223,2.133223
2416.95,-28.617844,-28.854844,43.853382,23.853382
2424.425,-28.532986,-28.770986,65.57354,45.57354
2431.9,-28.448126,-28.687126,87.293701,67.293701
2439.375,-29.036081,-29.276081,78.916893,58.916893
2446.85,-29.624039,-29.866039,70.540085,50.540085
2454.325,-30.211994,-30.454994,62.16328,42.16328
2461.8,-30.79995,-31.04395,53.786472,33.786472
2469.275,-33.41095,-33.65595,74.296478,54.296478
2476.75,-36.021946,-36.267946,94.80648,74.80648
2484.225,-38.632946,-38.879946,115.31649,95.31649
2491.7,-41.243942,-41.492942,135.826492,115.826492
2499.175,-39.549671,-39.799671,105.523514,85.523514
2506.65,-37.8554,-38.1064,75.220528,55.220528
2514.125,-36.161125,-36.413125,44.917538,24.917538
2521.6,-34.466854,-34.720854,14.614553,-5.385447
2529.075,-34.288052,-34.543052,34.238449,14.238449
2536.55,-34.109253,-34.365253,53.86235,33.86235
2544.025,-33.93045,-34.18745,73.486244,53.486244
2551.5,-33.751648,-34.009648,93.110138,73.110138
2558.975,-33.986145,-34.245145,128.761444,108.761444
2566.45,-34.220646,-34.481646,164.41275,144.41275
2573.925,-34.455143,-34.717143,-159.935959,-179.935959
2581.4,-34.68964,-34.95264,-124.28466,-144.28466
2588.875,-36.08746,-36.35146,-140.075012,-160.075012
2596.35,-37.485279,-37.750279,-155.865372,-175.865372
2603.825,-38.883102,-39.149102,-171.655731,-191.655731
2611.3,-40.280922,-40.547922,172.553909,152.553909
2618.775,-41.003372,-41.271372,-154.815857,-174.815857
2626.25,-41.725822,-41.995822,-122.185623,-142.185623
2633.725,-42.448277,-42.719277,-89.555389,-109.555389
2641.2,-43.170727,-43.442727,-56.925159,-76.925159
2648.675,-41.445095,-41.718095,-30.605652,-50.605652
2656.15,-39.719463,-39.993463,-4.286148,-24.286148
2663.625,-37.993832,-38.269832,22.033358,2.033358
2671.1,-36.268204,-36.545204,48.352863,28.352863
2678.575,-35.64978,-35.92778,82.543648,62.543648
2686.05,-35.031357,-35.310357,116.734436,96.734436
2693.525,-34.412933,-34.692933,150.925232,130.925232
2701,-33.794514,-34.075514,-174.883987,-194.883987
2708.475,-34.750813,-35.033813,159.451645,139.451645
2715.95,-35.707115,-35.991115,133.787262,113.787262
2723.425,-36.663414,-36.948414,108.122894,88.122894
2730.9,-37.619717,-37.905717,82.458527,62.458527
2738.375,-36.750767,-37.037767,92.089737,72.089737
2745.85,-35.881817,-36.170817,101.720947,81.720947
2753.325,-35.012871,-35.302871,111.352165,91.352165
2760.8,-34.143921,-34.434921,120.983368,100.983368
2768.275,-32.597511,-32.889511,78.466522,58.466522
2775.75,-31.0511,-31.3441,35.949673,15.949673
2783.225,-29.50469,-29.79969,-6.567181,-26.567181
2790.7,-27.958281,-28.254281,-49.08403,-69.08403
2798.175,-27.574146,-27.871146,-18.619856,-38.619856
2805.65,-27.190014,-27.488014,11.84432,-8.15568
2813.125,-26.80588,-27.10488,42.308495,22.308495
2820.6,-26.421745,-26.721745,72.772675,52.772675
2828.075,-26.49131,-26.79231,63.074512,43.074512
2835.55,-26.560875,-26.862875,53.376354,33.376354
2843.025,-26.63044,-26.93344,43.678188,23.678188
2850.5,-26.700005,-27.005005,33.98003,13.98003
2857.975,-25.958727,-26.264727,26.723011,6.723011
2865.45,-25.217449,-25.524449,19.465994,-0.534006000000002
2872.925,-24.476171,-24.784171,12.208972,-7.791028
2880.4,-23.734894,-24.043894,4.951952,-15.048048
2887.875,-23.548893,-23.858893,49.744934,29.744934
2895.35,-23.362894,-23.673894,94.537918,74.537918
2902.825,-23.176893,-23.488893,139.330902,119.330902
2910.3,-22.990894,-23.303894,-175.876129,-195.876129
2917.775,-22.988113,-23.302113,-144.260269,-164.260269
2925.25,-22.985332,-23.301332,-112.644417,-132.644417
2932.725,-22.982552,-23.299552,-81.028557,-101.028557
2940.2,-22.979769,-23.297769,-49.412704,-69.412704
2947.675,-23.174711,-23.493711,-55.158916,-75.158916
2955.15,-23.369654,-23.689654,-60.905132,-80.905132
2962.625,-23.564596,-23.885596,-66.651344,-86.651344
2970.1,-23.759539,-24.081539,-72.39756,-92.39756
2977.575,-23.55398,-23.87698,-79.075027,-99.075027
2985.05,-23.348419,-23.673419,-85.752502,-105.752502
2992.525,-23.142859,-23.468859,-92.42997,-112.42997
3000,-22.9373,-23.2643,-99.107437,-119.107437
\end{filecontents*}

\begin{document}

\begin{figure}
\begin{tikzpicture}
        \colorlet{dark orange}{orange!50!black}
        \colorlet{dark green}{green!75!black}
        \colorlet{dark red}{red!75!black}
        \colorlet{light red}{red!25}
    \begin{axis}[width = 7.5cm, height = 7cm,
        xmin=100,
        xmax=3000,
        ymax=5,
        ymin=-40,
        xtick={100,500,1000,1500,2000,2500,3000},
        grid=both,
        smooth,
        no markers,
        table/x index = 0,
        table/col sep=comma,
    ]
        \addplot [very thick,dark orange] table [y index = 1] {data_1.txt};
        \addplot [very thick,dark green] table [y index = 2] {data_1.txt};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document} 

谢谢!

答案1

例如添加

\fill [red, opacity=0.7] (100,0) rectangle (3000,5);
\fill [black, opacity=0.2] (100,0) rectangle (3000,-10);

在 s之前\addplot

pgfplots注意:如果您的版本不是太旧(>= 1.11),则此方法有效,因为您已设置compat=newest。如果您未compat设置为 1.11 或更高版本,则必须在坐标前面加上axis cs:,例如(axis cs:100,0)

相关内容