如何使用 PGF 从数据文件中获取 3D 网格图?

如何使用 PGF 从数据文件中获取 3D 网格图?

我发现这个问题但我认为它的答案不是我需要的。我希望数据文件中的图可以绘制为,即每个点都与其四边的最近邻居相连,但这似乎mesh/rows = 20不是所需的。我知道我们可以得到surf工作,但不是网格。这是代码、结果和数据文件。

\documentclass{article}
\usepackage{pgfplots,pgfplotstable}
\usepgfplotslibrary{colormaps}
\pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
colorbar,
colormap/cool,
view={50}{60},
xlabel={$n$}, ylabel={$m$},
]
\addplot3 [ %z buffer = sort,
            mesh/rows=20,
%           surf,
%           shader=faceted interp,
            ] table [ x index=1, y index=0, z index=2,] {A.txt};
\end{axis}
\end{tikzpicture}

\end{document}

在此处输入图片描述

1   1   0.9849947522980074
2   1   0.9126677289575621
3   1   0.8616963810826577
4   1   0.8670507868163388
5   1   0.8068071180050705
6   1   0.7025560655300496
7   1   0.6965392921623013
8   1   0.7116661009365772
9   1   0.6230064066789003
10  1   0.5491576765966669
11  1   0.5880257020230766
12  1   0.5909465722676203
13  1   0.49827171870090203
14  1   0.4735193341024717
15  1   0.5371019824860419
16  1   0.5213915573704375
17  1   0.44273717835385723
18  1   0.46525173713827356
19  1   0.53469294035586
20  1   0.5005758559135446
1   2   0.9805240416148973
2   2   0.8672948096625713
3   2   0.7654150354780521
4   2   0.7250815756747895
5   2   0.5918193010431265
6   2   0.43251969263904133
7   2   0.3989507246513643
8   2   0.3766053004187836
9   2   0.2708614887918839
10  2   0.20325990196534896
11  2   0.24166050167468206
12  2   0.27884956408396827
13  2   0.24686542195855715
14  2   0.25024285229880794
15  2   0.36008398192696917
16  2   0.4416495743702641
17  2   0.4319880716796371
18  2   0.49133483150126256
19  2   0.634715720309526
20  2   0.6866426436060198
1   3   0.9786401568549089
2   3   0.8518603695615389
3   3   0.7327141383203726
4   3   0.6588308974164017
5   3   0.4744610609224626
6   3   0.3022191540330243
7   3   0.26212059589462167
8   3   0.2183763072264471
9   3   0.13379101410809938
10  3   0.10245446739786841
11  3   0.1651552733515505
12  3   0.2539537859907286
13  3   0.27800912458928195
14  3   0.3330600402028503
15  3   0.5051829038757105
16  3   0.6217596740142378
17  3   0.6473516527006231
18  3   0.7580058590841303
19  3   0.8891721943729513
20  3   0.919028648705142
1   4   0.9775095801803366
2   4   0.8444275321166015
3   4   0.7200592749009946
4   4   0.62829412471862
5   4   0.41517375196539785
6   4   0.23987040549172783
7   4   0.19302550128944557
8   4   0.13991953300255983
9   4   0.08179379841606589
10  4   0.07675914009727426
11  4   0.16600673304436522
12  4   0.29638131106380905
13  4   0.3496822123272397
14  4   0.4433829534023518
15  4   0.6466533246568746
16  4   0.7582578199199165
17  4   0.8004445061032814
18  4   0.9126987761828026
19  4   0.9848664402784
20  4   0.9919016215173538
1   5   0.9767482677736947
2   5   0.839999004853212
3   5   0.7138754641399829
4   5   0.6119371404278706
5   5   0.3829416599410981
6   5   0.2086484307077675
7   5   0.1563769292053155
8   5   0.09818058863946609
9   5   0.060141599210424904
10  5   0.07240279369974763
11  5   0.184312155530273
12  5   0.34291536046909243
13  5   0.41220211809749235
14  5   0.5330523963891641
15  5   0.7444994862659942
16  5   0.8410486331918249
17  5   0.8898238773747777
18  5   0.9768231704739562
19  5   0.9959779911467309
20  5   0.9877726913263757
1   6   0.9761997735803828
2   6   0.8370343244977293
3   6   0.7103072847000804
4   6   0.6019136212215951
5   6   0.3635130262234154
6   6   0.19156766747457296
7   6   0.13549259381797085
8   6   0.07451679459068815
9   6   0.05050543843726923
10  6   0.07403772327419918
11  6   0.20331465834286055
12  6   0.3801607725634133
13  6   0.45944781683760516
14  6   0.599541524922874
15  6   0.8089798671376641
16  6   0.8912571235407847
17  6   0.94042251151666
18  6   0.99507561163166
19  6   0.9765433096909475
20  6   0.9554063375366207
1   7   0.9757856495857767
2   7   0.8349006096275481
3   7   0.7080028521702612
4   7   0.5951513274370628
5   7   0.3507493285351766
6   7   0.18137112603504033
7   7   0.12263186508119911
8   7   0.06017361166926149
9   7   0.04598802758070914
10  7   0.07707027212855729
11  7   0.2193177050672057
12  7   0.40769394447652035
13  7   0.4935776704210474
14  7   0.6474170710080149
15  7   0.8512383742341361
16  7   0.9222527090477511
17  7   0.9685368210745586
18  7   0.9924404894791505
19  7   0.9485292456232874
20  7   0.9150126000856894
1   8   0.9754618626528585
2   8   0.8332871400188365
3   8   0.7063934100020157
4   8   0.5902695471154772
5   8   0.3417922346575072
6   8   0.17481799368601733
7   8   0.11415209449276997
8   8   0.050935796603622074
9   8   0.043793351182278076
10  8   0.0801315797550853
11  8   0.23214655842084359
12  8   0.42777063042920865
13  8   0.5181182262179972
14  8   0.681919920790388
15  8   0.8792877982969959
16  8   0.941764951568574
17  8   0.9836883623186592
18  8   0.9812387897082173
19  8   0.9203353709073419
20  8   0.8747873312539506
1   9   0.9752017938453464
2   9   0.8320223057535675
3   9   0.7052042996802308
4   9   0.5865688036416216
5   9   0.3351822637391121
6   9   0.17034587132381449
7   9   0.10823677535828746
8   9   0.04467164513603006
9   9   0.04271509224094049
10  9   0.0828596552034225
11  9   0.2423777797314068
12  9   0.4425553134679512
13  9   0.5360035777090829
14  9   0.7071947295507155
15  9   0.8983599343584033
16  9   0.9543794916203049
17  9   0.9915065249407435
18  9   0.9674605580875149
19  9   0.8951058661123383
20  9   0.8381320553693657
1   10  0.9749884160214651
2   10  0.8310031047148891
3   10  0.7042882475189176
4   10  0.5836593499755556
5   10  0.33011104906648137
6   10  0.16714198338221406
7   10  0.10391764200848355
8   10  0.04023840346312661
9   10  0.04220031528519747
10  10  0.08520424969709825
11  10  0.250615528118845
12  10  0.4536423999298687
13  10  0.549309234210639
14  10  0.7261283439501424
15  10  0.9117059024779686
16  10  0.9627968890081722
17  10  0.9952429275044689
18  10  0.9538336688505147
19  10  0.8736982088093147
20  10  0.8061707747327931
1   11  0.9748102783163921
2   11  0.8301637654200654
3   11  0.7035596187813616
4   11  0.5813071360907991
5   11  0.326099500377942
6   11  0.16475408516191878
7   11  0.10064500092467538
8   11  0.03698790426388827
9   11  0.04198106863304532
10  11  0.08720390362640995
11  11  0.25734348237279364
12  11  0.4621276786840218
13  11  0.5594320594354817
14  11  0.7406493440296689
15  11  0.921321379851179
16  11  0.9686027133031194
17  11  0.9967315817534399
18  11  0.9414429181436982
19  11  0.8559831644887729
20  11  0.7789116462278717
1   12  0.9746593582608007
2   12  0.8294602260124657
3   12  0.7029653294102537
4   12  0.5793630114854895
5   12  0.32284724508268775
6   12  0.16291587772899951
7   12  0.09808923407972421
8   12  0.034533357572673125
9   12  0.041921013454243886
10  12  0.08891488571672464
11  12  0.2629214984422734
12  12  0.468753403420298
13  12  0.5673041348652645
14  12  0.7520394535619517
15  12  0.9284423902037846
16  12  0.9727379157907043
17  12  0.9969955821749448
18  12  0.9305959695012023
19  12  0.8414736205280189
20  12  0.7558842789005824
1   13  0.9745298634319252
2   13  0.8288618031713093
3   13  0.7024707359047608
4   13  0.5777272809445492
5   13  0.32015718129555376
6   13  0.16146228002445762
7   13  0.09604299169580172
8   13  0.03263345052949348
9   13  0.041947847771913356
10  13  0.09038974958994081
11  13  0.26761296791770484
12  13  0.47402528934932076
13  13  0.5735524187007477
14  13  0.761159525221184
15  13  0.933849906042575
16  13  0.9757724325466487
17  13  0.9966048808532246
18  13  0.9212612780519431
19  13  0.8296128164784756
20  13  0.736473953788209
1   14  0.9744175169360104
2   14  0.8283464416243423
3   14  0.7020522581512797
4   14  0.576330659660029
5   14  0.3178947988991966
6   14  0.16028673320346032
7   14  0.09437036634612127
8   14  0.03113170273590393
9   14  0.04202190117576168
10  14  0.0916722414828156
11  14  0.27161070550837596
12  14  0.47829272584307375
13  14  0.5786053297241494
14  14  0.768597991468984
15  14  0.9380494725402255
16  14  0.9780603462616664
17  14  0.9958777938157178
18  14  0.9132794718014977
19  14  0.819890021123838
20  14  0.7200768824935193
1   15  0.9743191023058267
2   15  0.8278978756069943
3   15  0.7016932767618984
4   15  0.5751234198837009
5   15  0.3159652801820271
6   15  0.15931786910323004
7   15  0.09297906700074655
8   15  0.02992318516556885
9   15  0.042120815100057156
10  15  0.09279733991115956
11  15  0.2750576429146243
12  15  0.4818012291055071
13  15  0.5827609082089847
14  15  0.7747651183843766
15  15  0.9413766884759768
16  15  0.9798276735879804
17  15  0.9949931269190597
18  15  0.9064588711347463
19  15  0.8118759346300541
20  15  0.7061604967748654
1   16  0.9742321600974492
2   16  0.8275038524491247
3   16  0.7013817317978438
4   16  0.5740688926756954
5   16  0.31429990725112167
6   16  0.15850635989639994
7   16  0.09180447243495769
8   16  0.028935454080200596
9   16  0.0422317395087597
10  16  0.09379265706398847
11  16  0.278060732352132
12  16  0.4847264064532958
13  16  0.586230426673598
14  16  0.7799527785487717
15  16  0.9440598633325228
16  16  0.9812226184935731
17  16  0.9940502418732138
18  16  0.9006155859832917
19  16  0.8052241971978209
20  16  0.6942782639859217
1   17  0.9741547801882323
2   17  0.8271549711081962
3   17  0.7011086526972083
4   17  0.5731394109522456
5   17  0.31284767624615084
6   17  0.15781716287433398
7   17  0.09080011486306573
8   17  0.028117201460879284
9   17  0.04234720316099628
10  17  0.09468000622034618
11  17  0.2807014005314763
12  17  0.48719606714689045
13  17  0.5891664264746381
14  17  0.7843727068604847
15  17  0.9462579450130053
16  17  0.9823448962710948
17  17  0.9931044836528449
18  17  0.8955878780156383
19  17  0.7996607914557149
20  17  0.6840651265434499
1   18  0.9740854452328088
2   18  0.8268438969079044
3   18  0.7008672213371718
4   18  0.5723136840755416
5   18  0.3115699404847103
6   18  0.15722477708632104
7   18  0.08993181987831042
8   18  0.027431264339444098
9   18  0.042462853221029696
10  18  0.09547659162569656
11  18  0.2830423851664391
12  18  0.4893047902282943
13  18  0.5916809921734612
14  18  0.7881813565196165
15  18  0.9480839849563053
16  18  0.9832632366734754
17  18  0.9921855983157919
18  18  0.8912391567077707
19  18  0.7949707335279369
20  18  0.6752261980880598
1   19  0.9740229768876701
2   19  0.8265648183117208
3   19  0.7006521557012362
4   19  0.5715750455764457
5   19  0.3104368827774051
6   19  0.15671024698120983
7   19  0.08917384281124413
8   19  0.02685018605637546
9   19  0.042576181039008384
10  19  0.09619624195573545
11  19  0.2851330185070501
12  19  0.49112366583241535
13  19  0.5938578516295558
14  19  0.7914963307170236
15  19  0.9496199867298184
16  19  0.984026083202284
17  19  0.9913087064437569
18  19  0.8874563516445629
19  19  0.7909856857224644
20  19  0.6675243474723878
1   20  0.9739663906569693
2   20  0.8263130647865856
3   20  0.700459295085701
4   20  0.5709102523753139
5   20  0.309425129374449
6   20  0.156259214500141
7   20  0.08850658350394892
8   20  0.026353320361585924
9   20  0.04268578519144508
10  20  0.09685007954617572
11  20  0.28701201784119207
12  20  0.492706912748766
13  20  0.595760521473147
14  20  0.7944074415256996
15  20  0.9509265123918835
16  20  0.9846682904131746
17  20  0.9904805275728602
18  20  0.884146729863299
19  20  0.787573599371838
20  20  0.6607689016208211

答案1

嗯,你尝试过mesh剧情类型吗?

在此处输入图片描述

\begin{filecontents*}{A.txt}
1   1   0.9849947522980074
2   1   0.9126677289575621
3   1   0.8616963810826577
4   1   0.8670507868163388
5   1   0.8068071180050705
6   1   0.7025560655300496
7   1   0.6965392921623013
8   1   0.7116661009365772
9   1   0.6230064066789003
10  1   0.5491576765966669
11  1   0.5880257020230766
12  1   0.5909465722676203
13  1   0.49827171870090203
14  1   0.4735193341024717
15  1   0.5371019824860419
16  1   0.5213915573704375
17  1   0.44273717835385723
18  1   0.46525173713827356
19  1   0.53469294035586
20  1   0.5005758559135446
1   2   0.9805240416148973
2   2   0.8672948096625713
3   2   0.7654150354780521
4   2   0.7250815756747895
5   2   0.5918193010431265
6   2   0.43251969263904133
7   2   0.3989507246513643
8   2   0.3766053004187836
9   2   0.2708614887918839
10  2   0.20325990196534896
11  2   0.24166050167468206
12  2   0.27884956408396827
13  2   0.24686542195855715
14  2   0.25024285229880794
15  2   0.36008398192696917
16  2   0.4416495743702641
17  2   0.4319880716796371
18  2   0.49133483150126256
19  2   0.634715720309526
20  2   0.6866426436060198
1   3   0.9786401568549089
2   3   0.8518603695615389
3   3   0.7327141383203726
4   3   0.6588308974164017
5   3   0.4744610609224626
6   3   0.3022191540330243
7   3   0.26212059589462167
8   3   0.2183763072264471
9   3   0.13379101410809938
10  3   0.10245446739786841
11  3   0.1651552733515505
12  3   0.2539537859907286
13  3   0.27800912458928195
14  3   0.3330600402028503
15  3   0.5051829038757105
16  3   0.6217596740142378
17  3   0.6473516527006231
18  3   0.7580058590841303
19  3   0.8891721943729513
20  3   0.919028648705142
1   4   0.9775095801803366
2   4   0.8444275321166015
3   4   0.7200592749009946
4   4   0.62829412471862
5   4   0.41517375196539785
6   4   0.23987040549172783
7   4   0.19302550128944557
8   4   0.13991953300255983
9   4   0.08179379841606589
10  4   0.07675914009727426
11  4   0.16600673304436522
12  4   0.29638131106380905
13  4   0.3496822123272397
14  4   0.4433829534023518
15  4   0.6466533246568746
16  4   0.7582578199199165
17  4   0.8004445061032814
18  4   0.9126987761828026
19  4   0.9848664402784
20  4   0.9919016215173538
1   5   0.9767482677736947
2   5   0.839999004853212
3   5   0.7138754641399829
4   5   0.6119371404278706
5   5   0.3829416599410981
6   5   0.2086484307077675
7   5   0.1563769292053155
8   5   0.09818058863946609
9   5   0.060141599210424904
10  5   0.07240279369974763
11  5   0.184312155530273
12  5   0.34291536046909243
13  5   0.41220211809749235
14  5   0.5330523963891641
15  5   0.7444994862659942
16  5   0.8410486331918249
17  5   0.8898238773747777
18  5   0.9768231704739562
19  5   0.9959779911467309
20  5   0.9877726913263757
1   6   0.9761997735803828
2   6   0.8370343244977293
3   6   0.7103072847000804
4   6   0.6019136212215951
5   6   0.3635130262234154
6   6   0.19156766747457296
7   6   0.13549259381797085
8   6   0.07451679459068815
9   6   0.05050543843726923
10  6   0.07403772327419918
11  6   0.20331465834286055
12  6   0.3801607725634133
13  6   0.45944781683760516
14  6   0.599541524922874
15  6   0.8089798671376641
16  6   0.8912571235407847
17  6   0.94042251151666
18  6   0.99507561163166
19  6   0.9765433096909475
20  6   0.9554063375366207
1   7   0.9757856495857767
2   7   0.8349006096275481
3   7   0.7080028521702612
4   7   0.5951513274370628
5   7   0.3507493285351766
6   7   0.18137112603504033
7   7   0.12263186508119911
8   7   0.06017361166926149
9   7   0.04598802758070914
10  7   0.07707027212855729
11  7   0.2193177050672057
12  7   0.40769394447652035
13  7   0.4935776704210474
14  7   0.6474170710080149
15  7   0.8512383742341361
16  7   0.9222527090477511
17  7   0.9685368210745586
18  7   0.9924404894791505
19  7   0.9485292456232874
20  7   0.9150126000856894
1   8   0.9754618626528585
2   8   0.8332871400188365
3   8   0.7063934100020157
4   8   0.5902695471154772
5   8   0.3417922346575072
6   8   0.17481799368601733
7   8   0.11415209449276997
8   8   0.050935796603622074
9   8   0.043793351182278076
10  8   0.0801315797550853
11  8   0.23214655842084359
12  8   0.42777063042920865
13  8   0.5181182262179972
14  8   0.681919920790388
15  8   0.8792877982969959
16  8   0.941764951568574
17  8   0.9836883623186592
18  8   0.9812387897082173
19  8   0.9203353709073419
20  8   0.8747873312539506
1   9   0.9752017938453464
2   9   0.8320223057535675
3   9   0.7052042996802308
4   9   0.5865688036416216
5   9   0.3351822637391121
6   9   0.17034587132381449
7   9   0.10823677535828746
8   9   0.04467164513603006
9   9   0.04271509224094049
10  9   0.0828596552034225
11  9   0.2423777797314068
12  9   0.4425553134679512
13  9   0.5360035777090829
14  9   0.7071947295507155
15  9   0.8983599343584033
16  9   0.9543794916203049
17  9   0.9915065249407435
18  9   0.9674605580875149
19  9   0.8951058661123383
20  9   0.8381320553693657
1   10  0.9749884160214651
2   10  0.8310031047148891
3   10  0.7042882475189176
4   10  0.5836593499755556
5   10  0.33011104906648137
6   10  0.16714198338221406
7   10  0.10391764200848355
8   10  0.04023840346312661
9   10  0.04220031528519747
10  10  0.08520424969709825
11  10  0.250615528118845
12  10  0.4536423999298687
13  10  0.549309234210639
14  10  0.7261283439501424
15  10  0.9117059024779686
16  10  0.9627968890081722
17  10  0.9952429275044689
18  10  0.9538336688505147
19  10  0.8736982088093147
20  10  0.8061707747327931
1   11  0.9748102783163921
2   11  0.8301637654200654
3   11  0.7035596187813616
4   11  0.5813071360907991
5   11  0.326099500377942
6   11  0.16475408516191878
7   11  0.10064500092467538
8   11  0.03698790426388827
9   11  0.04198106863304532
10  11  0.08720390362640995
11  11  0.25734348237279364
12  11  0.4621276786840218
13  11  0.5594320594354817
14  11  0.7406493440296689
15  11  0.921321379851179
16  11  0.9686027133031194
17  11  0.9967315817534399
18  11  0.9414429181436982
19  11  0.8559831644887729
20  11  0.7789116462278717
1   12  0.9746593582608007
2   12  0.8294602260124657
3   12  0.7029653294102537
4   12  0.5793630114854895
5   12  0.32284724508268775
6   12  0.16291587772899951
7   12  0.09808923407972421
8   12  0.034533357572673125
9   12  0.041921013454243886
10  12  0.08891488571672464
11  12  0.2629214984422734
12  12  0.468753403420298
13  12  0.5673041348652645
14  12  0.7520394535619517
15  12  0.9284423902037846
16  12  0.9727379157907043
17  12  0.9969955821749448
18  12  0.9305959695012023
19  12  0.8414736205280189
20  12  0.7558842789005824
1   13  0.9745298634319252
2   13  0.8288618031713093
3   13  0.7024707359047608
4   13  0.5777272809445492
5   13  0.32015718129555376
6   13  0.16146228002445762
7   13  0.09604299169580172
8   13  0.03263345052949348
9   13  0.041947847771913356
10  13  0.09038974958994081
11  13  0.26761296791770484
12  13  0.47402528934932076
13  13  0.5735524187007477
14  13  0.761159525221184
15  13  0.933849906042575
16  13  0.9757724325466487
17  13  0.9966048808532246
18  13  0.9212612780519431
19  13  0.8296128164784756
20  13  0.736473953788209
1   14  0.9744175169360104
2   14  0.8283464416243423
3   14  0.7020522581512797
4   14  0.576330659660029
5   14  0.3178947988991966
6   14  0.16028673320346032
7   14  0.09437036634612127
8   14  0.03113170273590393
9   14  0.04202190117576168
10  14  0.0916722414828156
11  14  0.27161070550837596
12  14  0.47829272584307375
13  14  0.5786053297241494
14  14  0.768597991468984
15  14  0.9380494725402255
16  14  0.9780603462616664
17  14  0.9958777938157178
18  14  0.9132794718014977
19  14  0.819890021123838
20  14  0.7200768824935193
1   15  0.9743191023058267
2   15  0.8278978756069943
3   15  0.7016932767618984
4   15  0.5751234198837009
5   15  0.3159652801820271
6   15  0.15931786910323004
7   15  0.09297906700074655
8   15  0.02992318516556885
9   15  0.042120815100057156
10  15  0.09279733991115956
11  15  0.2750576429146243
12  15  0.4818012291055071
13  15  0.5827609082089847
14  15  0.7747651183843766
15  15  0.9413766884759768
16  15  0.9798276735879804
17  15  0.9949931269190597
18  15  0.9064588711347463
19  15  0.8118759346300541
20  15  0.7061604967748654
1   16  0.9742321600974492
2   16  0.8275038524491247
3   16  0.7013817317978438
4   16  0.5740688926756954
5   16  0.31429990725112167
6   16  0.15850635989639994
7   16  0.09180447243495769
8   16  0.028935454080200596
9   16  0.0422317395087597
10  16  0.09379265706398847
11  16  0.278060732352132
12  16  0.4847264064532958
13  16  0.586230426673598
14  16  0.7799527785487717
15  16  0.9440598633325228
16  16  0.9812226184935731
17  16  0.9940502418732138
18  16  0.9006155859832917
19  16  0.8052241971978209
20  16  0.6942782639859217
1   17  0.9741547801882323
2   17  0.8271549711081962
3   17  0.7011086526972083
4   17  0.5731394109522456
5   17  0.31284767624615084
6   17  0.15781716287433398
7   17  0.09080011486306573
8   17  0.028117201460879284
9   17  0.04234720316099628
10  17  0.09468000622034618
11  17  0.2807014005314763
12  17  0.48719606714689045
13  17  0.5891664264746381
14  17  0.7843727068604847
15  17  0.9462579450130053
16  17  0.9823448962710948
17  17  0.9931044836528449
18  17  0.8955878780156383
19  17  0.7996607914557149
20  17  0.6840651265434499
1   18  0.9740854452328088
2   18  0.8268438969079044
3   18  0.7008672213371718
4   18  0.5723136840755416
5   18  0.3115699404847103
6   18  0.15722477708632104
7   18  0.08993181987831042
8   18  0.027431264339444098
9   18  0.042462853221029696
10  18  0.09547659162569656
11  18  0.2830423851664391
12  18  0.4893047902282943
13  18  0.5916809921734612
14  18  0.7881813565196165
15  18  0.9480839849563053
16  18  0.9832632366734754
17  18  0.9921855983157919
18  18  0.8912391567077707
19  18  0.7949707335279369
20  18  0.6752261980880598
1   19  0.9740229768876701
2   19  0.8265648183117208
3   19  0.7006521557012362
4   19  0.5715750455764457
5   19  0.3104368827774051
6   19  0.15671024698120983
7   19  0.08917384281124413
8   19  0.02685018605637546
9   19  0.042576181039008384
10  19  0.09619624195573545
11  19  0.2851330185070501
12  19  0.49112366583241535
13  19  0.5938578516295558
14  19  0.7914963307170236
15  19  0.9496199867298184
16  19  0.984026083202284
17  19  0.9913087064437569
18  19  0.8874563516445629
19  19  0.7909856857224644
20  19  0.6675243474723878
1   20  0.9739663906569693
2   20  0.8263130647865856
3   20  0.700459295085701
4   20  0.5709102523753139
5   20  0.309425129374449
6   20  0.156259214500141
7   20  0.08850658350394892
8   20  0.026353320361585924
9   20  0.04268578519144508
10  20  0.09685007954617572
11  20  0.28701201784119207
12  20  0.492706912748766
13  20  0.595760521473147
14  20  0.7944074415256996
15  20  0.9509265123918835
16  20  0.9846682904131746
17  20  0.9904805275728602
18  20  0.884146729863299
19  20  0.787573599371838
20  20  0.6607689016208211
\end{filecontents*}

\documentclass[tikz, border=2mm]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
\pgfplotsset{compat=1.17}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
  colorbar,
  colormap/cool,
  view={50}{60},
  xlabel={$n$}, ylabel={$m$},
]
\addplot3[mesh, mesh/rows=20] table [x index=1, y index=0, z index=2] {A.txt};
\end{axis}
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容