曲线看起来很嘈杂

曲线看起来很嘈杂

我想用pgfplots之前用 Origin 绘制的曲线绘制一条曲线。在两种情况下,我使用了同一组数据点,但结果看起来更嘈杂pgfplots。有人知道为什么会这样吗?

曲线看起来应如下所示(使用 Origin 创建):

在此处输入图片描述

这是生成的图像(使用 创建pgfplots):

在此处输入图片描述

平均能量损失

\documentclass{standalone}

\usepackage{pgfplots} % To produce graphs within tikz
\pgfplotsset{compat=newest}
\usepackage{pgfplotstable}


\begin{filecontents}{MWE.dat}
    theta Intensity
    20 73.99182
    20.02 76.83915
    20.04 78.9561
    20.06 80.34266
    20.08 80.99884
    20.1 80.92464
    20.12 78.48291
    20.14 77.04546
    20.16 71.56761
    20.18 70.22535
    20.2 73.50817
    20.22 79.44445
    20.24 81.48795
    20.26 83.98795
    20.28 82.8613
    20.3 81.75213
    20.32 81.20822
    20.34 81.46464
    20.36 79.43085
    20.38 81.30147
    20.4 84.89121
    20.42 84.10644
    20.44 83.71988
    20.46 81.80845
    20.48 78.33332
    20.5 75.91297
    20.52 75.43317
    20.54 78.29836
    20.56 78.63636
    20.58 82.17754
    20.6 86.4122
    20.62 87.28437
    20.64 89.02291
    20.66 88.30611
    20.68 89.26377
    20.7 90.43704
    20.72 90.09711
    20.74 91.67443
    20.76 91.3481
    20.78 94.22301
    20.8 98.65579
    20.82 96.85704
    20.84 97.05322
    20.86 102.0571
    20.88 106.11499
    20.9 107.54079
    20.92 107.61071
    20.94 111.49766
    20.96 113.39355
    20.98 114.70668
    21 115.45259
    21.02 115.22144
    21.04 113.70824
    21.06 122.76613
    21.08 129.82518
    21.1 137.18921
    21.12 147.99922
    21.14 165.13792
    21.16 180.26612
    21.18 196.12276
    21.2 219.41141
    21.22 250.45261
    21.24 292.89628
    21.26 351.4802
    21.28 432.66902
    21.3 540.22342
    21.32 695.10881
    21.34 896.84929
    21.36 1135.67406
    21.38 1446.64726
    21.4 1813.99962
    21.42 2222.88657
    21.44 2661.78323
    21.46 3089.967
    21.48 3507.10375
    21.5 3863.38775
    21.52 4172.22223
    21.54 4416.90948
    21.56 4568.19346
    21.58 4646.28009
    21.6 4624.16664
    21.62 4491.35584
    21.64 4249.28709
    21.66 3894.23854
    21.68 3459.37842
    21.7 2947.79334
    21.72 2425.18456
    21.74 1941.74051
    21.76 1501.53849
    21.78 1137.35823
    21.8 862.93514
    21.82 657.6593
    21.84 511.28595
    21.86 414.10064
    21.88 346.13637
    21.9 290.85276
    21.92 248.12744
    21.94 226.67833
    21.96 206.00623
    21.98 188.47709
    22 179.9087
    22.02 172.08236
    22.04 160.5439
    22.06 152.61266
    22.08 139.70862
    22.1 130.70707
    22.12 124.50468
    22.14 118.71019
    22.16 111.35782
    22.18 105.81198
    22.2 103.69465
    22.22 101.99885
    22.24 99.16474
    22.26 99.33956
    22.28 99.68922
    22.3 99.3687
    22.32 102.05906
    22.34 100.11267
    22.36 98.18572
    22.38 98.81703
    22.4 96.64919
    22.42 94.45611
    22.44 92.73894
    22.46 94.37647
    22.48 98.47708
    22.5 100.49339
    22.52 102.60489
    22.54 103.86558
    22.56 106.19464
    22.58 107.46115
    22.6 108.63249
    22.62 110.68183
    22.64 110.69155
    22.66 109.25799
    22.68 112.91766
    22.7 112.01828
    22.72 110.36716
    22.74 111.80461
    22.76 111.20243
    22.78 109.37648
    22.8 111.08394
    22.82 112.83996
    22.84 112.39319
    22.86 112.27081
    22.88 117.66319
    22.9 114.39977
    22.92 113.37412
    22.94 109.58428
    22.96 105.21559
    22.98 102.87683
    23 99.96308
    23.02 96.29176
    23.04 94.52215
    23.06 97.06878
    23.08 98.4596
    23.1 96.8007
    23.12 96.92113
    23.14 95.01165
    23.16 96.09361
    23.18 96.3811
    23.2 95.78086
    23.22 94.66004
    23.24 94.49494
    23.26 95.09129
    23.28 93.63054
    23.3 94.18028
    23.32 90.51672
    23.34 89.17834
    23.36 86.7366
    23.38 84.86402
    23.4 84.34731
    23.42 84.93783
    23.44 84.82906
    23.46 85.34577
    23.48 86.66085
    23.5 89.63093
    23.52 89.21523
    23.54 89.63675
    23.56 91.48212
    23.58 90.75758
    23.6 91.12665
    23.62 91.73465
    23.64 89.92035
    23.66 87.67094
    23.68 89.15113
    23.7 90.6857
    23.72 90.35742
    23.74 92.21057
    23.76 92.67871
    23.78 90.71485
    23.8 91.46077
    23.82 90.12238
    23.84 87.88462
    23.86 88.0575
    23.88 87.28245
    23.9 87.32712
    23.92 87.3077
    23.94 88.22456
    23.96 84.5066
    23.98 83.45764
    24 82.10371
    24.02 80.95569
    24.04 81.824
    24.06 82.82827
    24.08 82.6049
    24.1 83.57421
    24.12 82.7603
    24.14 82.97785
    24.16 81.14025
    24.18 76.75408
    24.2 70.71677
    24.22 67.77582
    24.24 64.02678
    24.26 63.53728
    24.28 62.38733
    24.3 62.55246
    24.32 66.61229
    24.34 71.75992
    24.36 73.98603
    24.38 73.81315
    24.4 73.30809
    24.42 74.22494
    24.44 72.38539
    24.46 70.1826
    24.48 66.7502
    24.5 65.89357
    24.52 66.83374
    24.54 65.38464
    24.56 65.47788
    24.58 66.08199
    24.6 67.45728
    24.62 68.76458
    24.64 68.77817
    24.66 66.40637
    24.68 66.79681
    24.7 64.93977
    24.72 64.30262
    24.74 62.86128
    24.76 63.06524
    24.78 60.37682
    24.8 60.033
    24.82 61.30729
    24.84 64.26573
    24.86 65.02914
    24.88 70.60024
    24.9 72.24166
    24.92 71.31898
    24.94 69.52994
    24.96 66.251
    24.98 60.41183
    25 59.08704
    25.02 60.06606
    25.04 62.63988
    25.06 62.22223
    25.08 63.87336
    25.1 60.75176
    25.12 59.53381
    25.14 58.14103
    25.16 56.7133
    25.18 54.5513
    25.2 57.33878
    25.22 60.78867
    25.24 64.62123
    25.26 64.37258
    25.28 63.99962
    25.3 63.41686
    25.32 64.62316
    25.34 64.58626
    25.36 63.31392
    25.38 61.29761
    25.4 60.61772
    25.42 59.48718
    25.44 57.78165
    25.46 57.87101
    25.48 57.40092
    25.5 58.09052
    25.52 57.24747
    25.54 60.86442
    25.56 59.24632
    25.58 60.23116
    25.6 59.84653
    25.62 59.81351
    25.64 60.62936
    25.66 63.37799
    25.68 61.63364
    25.7 59.83294
    25.72 59.71251
    25.74 60.82945
    25.76 57.33876
    25.78 58.52757
    25.8 57.06681
    25.82 56.29951
    25.84 56.68996
    25.86 57.65927
    25.88 56.75601
    25.9 57.64567
    25.92 60.44871
    25.94 62.25911
    25.96 63.05554
    25.98 66.14412
    26 64.8038
    26.02 63.60722
    26.04 63.8753
    26.06 61.51516
    26.08 59.37841
    26.1 58.26148
    26.12 55.53226
    26.14 54.93592
    26.16 55.2875
    26.18 56.87257
    26.2 56.3112
    26.22 58.33139
    26.24 60.31274
    26.26 59.93977
    26.28 59.36091
    26.3 56.51904
    26.32 56.04118
    26.34 56.85896
    26.36 58.50232
    26.38 58.93744
    26.4 60.5031
    26.42 61.30342
    26.44 61.65501
    26.46 59.99028
    26.48 57.63598
    26.5 56.41415
    26.52 58.6927
    26.54 59.95145
    26.56 60.51089
    26.58 60.70902
    26.6 60.45262
    26.62 58.33918
    26.64 59.7708
    26.66 59.30848
    26.68 60.02915
    26.7 61.33062
    26.72 60.42346
    26.74 58.7432
    26.76 56.5501
    26.78 56.4219
    26.8 55.71094
    26.82 55.16704
    26.84 56.76378
    26.86 58.32168
    26.88 57.56799
    26.9 57.49223
    26.92 56.03923
    26.94 54.7941
    26.96 55.42153
    26.98 59.14918
    27 59.29487
    27.02 60.13598
    27.04 60.15347
    27.06 60.92658
    27.08 59.15889
    27.1 58.68297
    27.12 57.67675
    27.14 58.34109
    27.16 58.66547
    27.18 60.55941
    27.2 60.21754
    27.22 60.4118
    27.24 59.79215
    27.26 58.33722
    27.28 56.67833
    27.3 57.05713
    27.32 57.10958
    27.34 55.68767
    27.36 53.93746
    27.38 52.93708
    27.4 53.47321
    27.42 53.72573
    27.44 55.01555
    27.46 55.87608
    27.48 57.96038
    27.5 60.338
    27.52 60.56915
    27.54 57.85548
    27.56 57.5777
    27.58 54.60955
    27.6 53.44599
    27.62 52.64761
    27.64 51.19464
    27.66 52.18338
    27.68 54.11034
    27.7 56.6181
    27.72 58.29837
    27.74 58.1857
    27.76 57.8069
    27.78 55.81778
    27.8 52.92733
    27.82 51.75601
    27.84 51.89782
    27.86 53.97629
    27.88 55.33409
    27.9 58.55864
    27.92 59.81739
    27.94 60.12235
    27.96 58.31584
    27.98 55.89355
    28 54.25603
    28.02 52.1931
    28.04 52.04936
    28.06 50.52837
    28.08 48.05556
    28.1 49.00738
    28.12 51.72301
    28.14 53.43241
    28.16 54.67756
    28.18 56.65892
    28.2 59.03072
    28.22 57.8555
    28.24 57.46895
    28.26 56.70942
    28.28 54.58432
    28.3 55.76341
    28.32 56.81624
    28.34 56.1519
    28.36 57.76418
    28.38 57.88072
    28.4 58.60333
    28.42 59.80768
    28.44 60.57692
    28.46 61.41802
    28.48 59.82906
    28.5 58.82091
    28.52 57.16978
    28.54 55.39434
    28.56 54.67173
    28.58 52.07461
    28.6 52.14647
    28.62 53.45378
    28.64 52.60102
    28.66 52.61072
    28.68 51.50933
    28.7 51.84345
    28.72 53.65191
    28.74 53.23233
    28.76 54.23467
    28.78 53.80343
    28.8 51.83179
    28.82 51.38502
    28.84 51.51711
    28.86 51.98523
    28.88 52.40675
    28.9 55.31663
    28.92 58.33721
    28.94 59.05982
    28.96 60.43706
    28.98 60.18259
    29 57.20862
    29.02 56.16356
    29.04 53.89667
    29.06 50.14764
    29.08 50.99068
    29.1 50.79449
    29.12 51.88229
    29.14 51.25679
    29.16 50.95959
    29.18 52.02601
    29.2 51.32672
    29.22 51.74437
    29.24 50.68766
    29.26 52.41843
    29.28 57.4631
    29.3 57.22613
    29.32 59.94563
    29.34 58.98215
    29.36 57.76031
    29.38 57.02993
    29.4 54.74166
    29.42 55.63328
    29.44 55.8489
    29.46 58.47127
    29.48 61.81626
    29.5 63.57034
    29.52 67.98953
    29.54 67.51556
    29.56 66.20436
    29.58 67.87102
    29.6 65.27389
    29.62 65.27
    29.64 65.96541
    29.66 68.45571
    29.68 69.5338
    29.7 70.30692
    29.72 71.7463
    29.74 72.37567
    29.76 72.24358
    29.78 76.655
    29.8 75.60606
    29.82 75.11071
    29.84 75.45649
    29.86 74.56489
    29.88 72.68649
    29.9 70.05246
    29.92 67.09984
    29.94 67.02991
    29.96 67.12314
    29.98 66.55789
    30 65.67988
    30.02 64.42697
    30.04 63.16047
    30.06 63.50623
    30.08 65.33801
    30.1 64.7805
    30.12 65.46424
    30.14 65.39043
    30.16 65.96152
    30.18 64.8776
    30.2 67.13285
    30.22 68.77428
    30.24 68.93745
    30.26 71.7094
    30.28 73.78206
    30.3 75.74786
    30.32 76.8279
    30.34 79.96116
    30.36 85.42542
    30.38 95.51089
    30.4 103.2945
    30.42 110.34189
    30.44 122.20475
    30.46 135.72067
    30.48 148.05556
    30.5 161.96581
    30.52 177.22027
    30.54 192.08429
    30.56 204.89897
    30.58 224.03457
    30.6 237.87296
    30.62 249.96115
    30.64 261.12278
    30.66 264.66397
    30.68 263.71409
    30.7 259.89123
    30.72 253.70241
    30.74 235.70707
    30.76 217.4456
    30.78 201.07614
    30.8 182.02991
    30.82 159.41529
    30.84 137.4728
    30.86 120.29137
    30.88 107.20086
    30.9 97.31158
    30.92 89.54935
    30.94 82.50001
    30.96 78.60336
    30.98 76.02178
    31 73.96854
    31.02 70.63519
    31.04 69.49105
    31.06 69.20745
    31.08 66.12082
    31.1 62.10761
    31.12 62.76223
    31.14 63.52952
    31.16 62.66901
    31.18 61.64142
    31.2 63.15658
    31.22 62.03768
    31.24 58.95105
    31.26 56.73466
    31.28 53.72184
    31.3 50.66046
    31.32 53.06916
    31.34 52.25136
    31.36 53.40715
    31.38 54.52214
    31.4 57.15812
    31.42 54.77855
    31.44 55.39432
    31.46 57.68065
    31.48 56.48019
    31.5 55.62937
    31.52 56.24321
    31.54 56.24903
    31.56 56.30342
    31.58 56.74437
    31.6 55.90521
    31.62 53.22068
    31.64 54.46388
    31.66 54.77856
    31.68 54.12199
    31.7 54.70086
    31.72 56.04313
    31.74 55.01748
    31.76 54.44251
    31.78 55.4157
    31.8 54.49107
    31.82 57.44561
    31.84 60.7129
    31.86 64.40754
    31.88 63.55866
    31.9 63.33527
    31.92 65.02914
    31.94 67.22417
    31.96 67.81857
    31.98 67.15034
    32 66.97163
    32.02 72.03379
    32.04 72.13675
    32.06 74.49495
    32.08 70.94018
    32.1 71.69193
    32.12 72.94096
    32.14 74.05401
    32.16 71.29177
    32.18 70.33994
    32.2 69.18027
    32.22 69.58236
    32.24 66.28204
    32.26 65.47785
    32.28 63.63635
    32.3 64.62897
    32.32 62.76417
    32.34 62.0979
    32.36 62.31158
    32.38 62.72728
    32.4 62.99924
    32.42 63.97631
    32.44 63.85199
    32.46 65.29333
    32.48 64.97476
    32.5 65.12627
    32.52 62.18532
    32.54 60.5303
    32.56 59.03067
    32.58 58.87527
    32.6 58.71794
    32.62 58.93161
    32.64 61.77544
    32.66 64.48912
    32.68 64.82907
    32.7 65.04858
    32.72 61.74049
    32.74 59.05012
    32.76 57.4359
    32.78 56.78712
    32.8 54.51633
    32.82 53.77623
    32.84 54.28711
    32.86 55.73038
    32.88 56.33645
    32.9 55.0408
    32.92 54.69698
    32.94 53.07109
    32.96 52.98562
    32.98 52.75252
    33 52.53884
    33.02 52.75446
    33.04 51.56954
    33.06 50.7634
    33.08 51.68805
    33.1 51.96389
    33.12 55.0952
    33.14 53.32752
    33.16 53.59947
    33.18 54.17445
    33.2 53.15464
    33.22 53.22651
    33.24 51.44717
    33.26 49.16473
    33.28 49.75914
    33.3 48.15851
    33.32 48.21289
    33.34 46.31506
    33.36 44.98251
    33.38 43.44016
    33.4 41.37528
    33.42 41.83372
    33.44 42.46503
    33.46 43.7568
    33.48 45.24476
    33.5 44.75913
    33.52 46.12665
    33.54 47.69814
    33.56 45.71097
    33.58 46.02759
    33.6 45.54196
    33.62 46.12859
    33.64 45.80419
    33.66 45.41569
    33.68 47.32711
    33.7 46.13052
    33.72 46.09168
    33.74 45.65073
    33.76 43.28283
    33.78 44.51632
    33.8 46.30925
    33.82 48.49261
    33.84 47.0746
    33.86 46.22961
    33.88 47.16395
    33.9 45.85276
    33.92 44.63092
    33.94 43.74903
    33.96 42.3854
    33.98 43.47514
    34 46.46659
    34.02 48.11577
    34.04 46.52486
    34.06 47.25524
    34.08 46.66277
    34.1 47.29797
    34.12 46.64917
    34.14 46.14607
    34.16 45.76923
    34.18 44.16279
    34.2 45.07382
    34.22 44.62899
    34.24 44.8038
    34.26 46.56177
    34.28 46.69386
    34.3 50.56138
    34.32 50.00388
    34.34 49.29682
    34.36 47.86909
    34.38 46.08393
    34.4 45.81587
    34.42 45.86637
    34.44 46.10723
    34.46 46.75991
    34.48 46.88035
    34.5 49.4056
    34.52 47.17755
    34.54 47.79527
    34.56 47.59713
    34.58 45.38267
    34.6 41.99495
    34.62 41.4219
    34.64 40.54972
    34.66 41.76961
    34.68 43.29837
    34.7 43.58198
    34.72 44.94757
    34.74 47.77197
    34.76 47.36986
    34.78 46.93279
    34.8 45.4254
    34.82 46.16938
    34.84 46.60062
    34.86 46.11306
    34.88 46.59092
    34.9 45.08161
    34.92 46.07229
    34.94 46.01401
    34.96 43.68689
    34.98 44.67756
    35 43.61694
    
\end{filecontents}


\begin{document}

    \begin{tikzpicture}
        
        \pgfplotstableread{MWE.dat}\mydata;
        
        \begin{axis}[width=8cm,
            height=10cm,
            xmin=20,
            xmax=70,
            xtick distance= 5,
            minor x tick num = 4,
            ymode=log,
            ymin=2.5E1,
            ymax=2E4,
            yticklabels={,,}]
            
            \addplot[no markers, thick] table {MWE.dat};
            
        \end{axis}
        
    \end{tikzpicture}

\end{document}

答案1

原有的剧情因为台词的加入而“受损”。

在此处输入图片描述

如果你改变行连接,结果看起来可能会更好。例如,添加line join=round,即

\addplot[no markers, thick,line join=round] table {MWE.dat};

产量

在此处输入图片描述

当然,除了可以更改的颜色之外,这看起来与 ORIGINS 结果非常相似。

相关内容