我想使用 Tikz 在 Latex 中绘制 3D 图形,就像在 Matlab 中一样,问题是轴的设置。在 Matlab 中我有
\begin{figure}[!ht]
\centering
\begin{tikzpicture}
\begin{axis}[x dir=reverse,
restrict z to domain=-inf:inf,
view={45}{45},
y tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
x tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
z tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
grid=major,
xlabel = $\mu_1$,
ylabel = $\mu_2$,
zlabel = $\gamma$]
\addplot3 [surf,shader=faceted,colormap/greenyellow] table[x=b, y=a, z=c, col sep=comma] {Figure2_A.csv};
\addplot3 [surf,shader=faceted,colormap/redyellow] table[x=b, y=a, z=c, col sep=comma] {Figure2_B.csv};
\end{axis}
\end{tikzpicture}
\end{figure}
如何解决 Tikz 中的绘图问题以获得与 Matlab 相同的视图?
图 2_A 的数据
a,b,c
0.010000,9.510000,Inf
0.510000,9.510000,Inf
1.010000,9.510000,Inf
1.510000,9.510000,Inf
2.010000,9.510000,Inf
2.510000,9.510000,Inf
3.010000,9.510000,Inf
3.510000,9.510000,Inf
4.010000,9.510000,Inf
4.510000,9.510000,Inf
5.010000,9.510000,Inf
5.510000,9.510000,Inf
6.010000,9.510000,Inf
6.510000,9.510000,Inf
7.010000,9.510000,Inf
7.510000,9.510000,Inf
8.010000,9.510000,Inf
8.510000,9.510000,Inf
9.010000,9.510000,Inf
9.510000,9.510000,Inf
0.010000,9.010000,Inf
0.510000,9.010000,Inf
1.010000,9.010000,Inf
1.510000,9.010000,Inf
2.010000,9.010000,Inf
2.510000,9.010000,Inf
3.010000,9.010000,Inf
3.510000,9.010000,Inf
4.010000,9.010000,Inf
4.510000,9.010000,Inf
5.010000,9.010000,Inf
5.510000,9.010000,Inf
6.010000,9.010000,Inf
6.510000,9.010000,Inf
7.010000,9.010000,Inf
7.510000,9.010000,Inf
8.010000,9.010000,Inf
8.510000,9.010000,Inf
9.010000,9.010000,Inf
9.510000,9.010000,Inf
0.010000,8.510000,0.196820
0.510000,8.510000,0.205741
1.010000,8.510000,0.215251
1.510000,8.510000,0.225780
2.010000,8.510000,0.236192
2.510000,8.510000,0.247012
3.010000,8.510000,0.257430
3.510000,8.510000,0.266383
4.010000,8.510000,0.271913
4.510000,8.510000,0.270158
5.010000,8.510000,0.252953
5.510000,8.510000,Inf
6.010000,8.510000,Inf
6.510000,8.510000,Inf
7.010000,8.510000,Inf
7.510000,8.510000,Inf
8.010000,8.510000,Inf
8.510000,8.510000,Inf
9.010000,8.510000,Inf
9.510000,8.510000,Inf
0.010000,8.010000,0.198648
0.510000,8.010000,0.208199
1.010000,8.010000,0.218925
1.510000,8.010000,0.230932
2.010000,8.010000,0.244251
2.510000,8.010000,0.259429
3.010000,8.010000,0.276492
3.510000,8.010000,0.295888
4.010000,8.010000,0.317935
4.510000,8.010000,0.343058
5.010000,8.010000,0.370857
5.510000,8.010000,0.399810
6.010000,8.010000,0.423585
6.510000,8.010000,0.422893
7.010000,8.010000,Inf
7.510000,8.010000,Inf
8.010000,8.010000,Inf
8.510000,8.010000,Inf
9.010000,8.010000,Inf
9.510000,8.010000,Inf
0.010000,7.510000,0.198576
0.510000,7.510000,0.208333
1.010000,7.510000,0.219142
1.510000,7.510000,0.231059
2.010000,7.510000,0.244690
2.510000,7.510000,0.259965
3.010000,7.510000,0.277488
3.510000,7.510000,0.297617
4.010000,7.510000,0.321088
4.510000,7.510000,0.348667
5.010000,7.510000,0.381373
5.510000,7.510000,0.420411
6.010000,7.510000,0.466230
6.510000,7.510000,0.516926
7.010000,7.510000,0.552910
7.510000,7.510000,Inf
8.010000,7.510000,Inf
8.510000,7.510000,Inf
9.010000,7.510000,Inf
9.510000,7.510000,Inf
0.010000,7.010000,0.198642
0.510000,7.010000,0.208307
1.010000,7.010000,0.219084
1.510000,7.010000,0.231133
2.010000,7.010000,0.244641
2.510000,7.010000,0.259998
3.010000,7.010000,0.277510
3.510000,7.010000,0.297858
4.010000,7.010000,0.321528
4.510000,7.010000,0.349376
5.010000,7.010000,0.382814
5.510000,7.010000,0.423316
6.010000,7.010000,0.472614
6.510000,7.010000,0.531500
7.010000,7.010000,0.590477
7.510000,7.010000,Inf
8.010000,7.010000,Inf
8.510000,7.010000,Inf
9.010000,7.010000,Inf
9.510000,7.010000,Inf
0.010000,6.510000,0.198533
0.510000,6.510000,0.208242
1.010000,6.510000,0.219021
1.510000,6.510000,0.231093
2.010000,6.510000,0.244600
2.510000,6.510000,0.260049
3.010000,6.510000,0.277579
3.510000,6.510000,0.297853
4.010000,6.510000,0.321538
4.510000,6.510000,0.349555
5.010000,6.510000,0.383122
5.510000,6.510000,0.423749
6.010000,6.510000,0.474038
6.510000,6.510000,0.534794
7.010000,6.510000,0.590082
7.510000,6.510000,Inf
8.010000,6.510000,Inf
8.510000,6.510000,Inf
9.010000,6.510000,Inf
9.510000,6.510000,Inf
0.010000,6.010000,0.198439
0.510000,6.010000,0.208208
1.010000,6.010000,0.218991
1.510000,6.010000,0.230965
2.010000,6.010000,0.244601
2.510000,6.010000,0.259949
3.010000,6.010000,0.277548
3.510000,6.010000,0.297947
4.010000,6.010000,0.321576
4.510000,6.010000,0.349577
5.010000,6.010000,0.383294
5.510000,6.010000,0.424026
6.010000,6.010000,0.474551
6.510000,6.010000,0.535128
7.010000,6.010000,0.589616
7.510000,6.010000,Inf
8.010000,6.010000,Inf
8.510000,6.010000,Inf
9.010000,6.010000,Inf
9.510000,6.010000,Inf
0.010000,5.510000,0.198449
0.510000,5.510000,0.208182
1.010000,5.510000,0.218953
1.510000,5.510000,0.231041
2.010000,5.510000,0.244595
2.510000,5.510000,0.259966
3.010000,5.510000,0.277491
3.510000,5.510000,0.297648
4.010000,5.510000,0.321566
4.510000,5.510000,0.349600
5.010000,5.510000,0.383291
5.510000,5.510000,0.424163
6.010000,5.510000,0.474291
6.510000,5.510000,0.534506
7.010000,5.510000,0.589414
7.510000,5.510000,Inf
8.010000,5.510000,Inf
8.510000,5.510000,Inf
9.010000,5.510000,Inf
9.510000,5.510000,Inf
0.010000,5.010000,0.198495
0.510000,5.010000,0.208211
1.010000,5.010000,0.219036
1.510000,5.010000,0.230975
2.010000,5.010000,0.244600
2.510000,5.010000,0.259944
3.010000,5.010000,0.277544
3.510000,5.010000,0.297795
4.010000,5.010000,0.321402
4.510000,5.010000,0.349621
5.010000,5.010000,0.383172
5.510000,5.010000,0.424057
6.010000,5.010000,0.474204
6.510000,5.010000,0.534462
7.010000,5.010000,0.588711
7.510000,5.010000,Inf
8.010000,5.010000,Inf
8.510000,5.010000,Inf
9.010000,5.010000,Inf
9.510000,5.010000,Inf
0.010000,4.510000,0.198550
0.510000,4.510000,0.208246
1.010000,4.510000,0.218984
1.510000,4.510000,0.231004
2.010000,4.510000,0.244653
2.510000,4.510000,0.260022
3.010000,4.510000,0.277540
3.510000,4.510000,0.297803
4.010000,4.510000,0.321578
4.510000,4.510000,0.349576
5.010000,4.510000,0.383136
5.510000,4.510000,0.423912
6.010000,4.510000,0.474132
6.510000,4.510000,0.534284
7.010000,4.510000,0.588427
7.510000,4.510000,Inf
8.010000,4.510000,Inf
8.510000,4.510000,Inf
9.010000,4.510000,Inf
9.510000,4.510000,Inf
0.010000,4.010000,0.198543
0.510000,4.010000,0.208254
1.010000,4.010000,0.219094
1.510000,4.010000,0.231108
2.010000,4.010000,0.244657
2.510000,4.010000,0.260043
3.010000,4.010000,0.277524
3.510000,4.010000,0.297825
4.010000,4.010000,0.321587
4.510000,4.010000,0.349563
5.010000,4.010000,0.382955
5.510000,4.010000,0.424013
6.010000,4.010000,0.474007
6.510000,4.010000,0.534008
7.010000,4.010000,0.587635
7.510000,4.010000,Inf
8.010000,4.010000,Inf
8.510000,4.010000,Inf
9.010000,4.010000,Inf
9.510000,4.010000,Inf
0.010000,3.510000,0.198576
0.510000,3.510000,0.208205
1.010000,3.510000,0.219102
1.510000,3.510000,0.231118
2.010000,3.510000,0.244602
2.510000,3.510000,0.259898
3.010000,3.510000,0.277447
3.510000,3.510000,0.297877
4.010000,3.510000,0.321554
4.510000,3.510000,0.349376
5.010000,3.510000,0.382973
5.510000,3.510000,0.423942
6.010000,3.510000,0.474013
6.510000,3.510000,0.533846
7.010000,3.510000,0.586770
7.510000,3.510000,Inf
8.010000,3.510000,Inf
8.510000,3.510000,Inf
9.010000,3.510000,Inf
9.510000,3.510000,Inf
0.010000,3.010000,0.198563
0.510000,3.010000,0.208313
1.010000,3.010000,0.219156
1.510000,3.010000,0.231118
2.010000,3.010000,0.244660
2.510000,3.010000,0.260010
3.010000,3.010000,0.277633
3.510000,3.010000,0.297731
4.010000,3.010000,0.321521
4.510000,3.010000,0.349363
5.010000,3.010000,0.382979
5.510000,3.010000,0.423837
6.010000,3.010000,0.473799
6.510000,3.010000,0.533550
7.010000,3.010000,0.586189
7.510000,3.010000,Inf
8.010000,3.010000,Inf
8.510000,3.010000,Inf
9.010000,3.010000,Inf
9.510000,3.010000,Inf
0.010000,2.510000,0.198596
0.510000,2.510000,0.208281
1.010000,2.510000,0.219056
1.510000,2.510000,0.231118
2.010000,2.510000,0.244707
2.510000,2.510000,0.259959
3.010000,2.510000,0.277488
3.510000,2.510000,0.297847
4.010000,2.510000,0.321403
4.510000,2.510000,0.349401
5.010000,2.510000,0.382839
5.510000,2.510000,0.423736
6.010000,2.510000,0.473740
6.510000,2.510000,0.533346
7.010000,2.510000,0.585304
7.510000,2.510000,Inf
8.010000,2.510000,Inf
8.510000,2.510000,Inf
9.010000,2.510000,Inf
9.510000,2.510000,Inf
0.010000,2.010000,0.198578
0.510000,2.010000,0.208288
1.010000,2.010000,0.219091
1.510000,2.010000,0.231099
2.010000,2.010000,0.244643
2.510000,2.010000,0.260007
3.010000,2.010000,0.277604
3.510000,2.010000,0.297741
4.010000,2.010000,0.321410
4.510000,2.010000,0.349299
5.010000,2.010000,0.382804
5.510000,2.010000,0.423636
6.010000,2.010000,0.473553
6.510000,2.010000,0.533096
7.010000,2.010000,0.584742
7.510000,2.010000,Inf
8.010000,2.010000,Inf
8.510000,2.010000,Inf
9.010000,2.010000,Inf
9.510000,2.010000,Inf
0.010000,1.510000,0.198564
0.510000,1.510000,0.208250
1.010000,1.510000,0.219040
1.510000,1.510000,0.231104
2.010000,1.510000,0.244669
2.510000,1.510000,0.260065
3.010000,1.510000,0.277689
3.510000,1.510000,0.297885
4.010000,1.510000,0.321357
4.510000,1.510000,0.349296
5.010000,1.510000,0.382720
5.510000,1.510000,0.423504
6.010000,1.510000,0.473470
6.510000,1.510000,0.532750
7.010000,1.510000,0.583544
7.510000,1.510000,Inf
8.010000,1.510000,Inf
8.510000,1.510000,Inf
9.010000,1.510000,Inf
9.510000,1.510000,Inf
0.010000,1.010000,0.198567
0.510000,1.010000,0.208241
1.010000,1.010000,0.219060
1.510000,1.010000,0.231052
2.010000,1.010000,0.244681
2.510000,1.010000,0.259975
3.010000,1.010000,0.277478
3.510000,1.010000,0.297771
4.010000,1.010000,0.321371
4.510000,1.010000,0.349263
5.010000,1.010000,0.382639
5.510000,1.010000,0.423585
6.010000,1.010000,0.473296
6.510000,1.010000,0.532418
7.010000,1.010000,0.582798
7.510000,1.010000,Inf
8.010000,1.010000,Inf
8.510000,1.010000,Inf
9.010000,1.010000,Inf
9.510000,1.010000,Inf
0.010000,0.510000,0.198565
0.510000,0.510000,0.208271
1.010000,0.510000,0.219030
1.510000,0.510000,0.231036
2.010000,0.510000,0.244679
2.510000,0.510000,0.259951
3.010000,0.510000,0.277479
3.510000,0.510000,0.297693
4.010000,0.510000,0.321398
4.510000,0.510000,0.349212
5.010000,0.510000,0.382553
5.510000,0.510000,0.423368
6.010000,0.510000,0.473107
6.510000,0.510000,0.532145
7.010000,0.510000,0.582265
7.510000,0.510000,Inf
8.010000,0.510000,Inf
8.510000,0.510000,Inf
9.010000,0.510000,Inf
9.510000,0.510000,Inf
0.010000,0.010000,0.198502
0.510000,0.010000,0.208281
1.010000,0.010000,0.218997
1.510000,0.010000,0.231024
2.010000,0.010000,0.244606
2.510000,0.010000,0.259934
3.010000,0.010000,0.277472
3.510000,0.010000,0.297686
4.010000,0.010000,0.321376
4.510000,0.010000,0.349193
5.010000,0.010000,0.382549
5.510000,0.010000,0.423220
6.010000,0.010000,0.472957
6.510000,0.010000,0.531692
7.010000,0.010000,0.580580
7.510000,0.010000,Inf
8.010000,0.010000,Inf
8.510000,0.010000,Inf
9.010000,0.010000,Inf
9.510000,0.010000,Inf
FigureB_A 的日期
a,b,c
0.010000,9.510000,0.186150
0.510000,9.510000,0.193407
1.010000,9.510000,0.201116
1.510000,9.510000,0.208901
2.010000,9.510000,0.216826
2.510000,9.510000,0.224029
3.010000,9.510000,0.229902
3.510000,9.510000,0.232360
4.010000,9.510000,0.226763
4.510000,9.510000,0.179027
5.010000,9.510000,Inf
5.510000,9.510000,Inf
6.010000,9.510000,Inf
6.510000,9.510000,Inf
7.010000,9.510000,Inf
7.510000,9.510000,Inf
8.010000,9.510000,Inf
8.510000,9.510000,Inf
9.010000,9.510000,Inf
9.510000,9.510000,Inf
0.010000,9.010000,0.186073
0.510000,9.010000,0.193330
1.010000,9.010000,0.200941
1.510000,9.010000,0.208797
2.010000,9.010000,0.216637
2.510000,9.010000,0.223904
3.010000,9.010000,0.229734
3.510000,9.010000,0.232209
4.010000,9.010000,0.226383
4.510000,9.010000,0.178989
5.010000,9.010000,Inf
5.510000,9.010000,Inf
6.010000,9.010000,Inf
6.510000,9.010000,Inf
7.010000,9.010000,Inf
7.510000,9.010000,Inf
8.010000,9.010000,Inf
8.510000,9.010000,Inf
9.010000,9.010000,Inf
9.510000,9.010000,Inf
0.010000,8.510000,0.185964
0.510000,8.510000,0.193240
1.010000,8.510000,0.200812
1.510000,8.510000,0.208659
2.010000,8.510000,0.216423
2.510000,8.510000,0.223743
3.010000,8.510000,0.229560
3.510000,8.510000,0.231915
4.010000,8.510000,0.226056
4.510000,8.510000,0.178902
5.010000,8.510000,Inf
5.510000,8.510000,Inf
6.010000,8.510000,Inf
6.510000,8.510000,Inf
7.010000,8.510000,Inf
7.510000,8.510000,Inf
8.010000,8.510000,Inf
8.510000,8.510000,Inf
9.010000,8.510000,Inf
9.510000,8.510000,Inf
0.010000,8.010000,0.185875
0.510000,8.010000,0.193110
1.010000,8.010000,0.200753
1.510000,8.010000,0.208518
2.010000,8.010000,0.216358
2.510000,8.010000,0.223607
3.010000,8.010000,0.229314
3.510000,8.010000,0.231685
4.010000,8.010000,0.225732
4.510000,8.010000,0.178781
5.010000,8.010000,Inf
5.510000,8.010000,Inf
6.010000,8.010000,Inf
6.510000,8.010000,Inf
7.010000,8.010000,Inf
7.510000,8.010000,Inf
8.010000,8.010000,Inf
8.510000,8.010000,Inf
9.010000,8.010000,Inf
9.510000,8.010000,Inf
0.010000,7.510000,0.185780
0.510000,7.510000,0.193041
1.010000,7.510000,0.200618
1.510000,7.510000,0.208431
2.010000,7.510000,0.216071
2.510000,7.510000,0.223432
3.010000,7.510000,0.229079
3.510000,7.510000,0.231321
4.010000,7.510000,0.225273
4.510000,7.510000,0.178731
5.010000,7.510000,Inf
5.510000,7.510000,Inf
6.010000,7.510000,Inf
6.510000,7.510000,Inf
7.010000,7.510000,Inf
7.510000,7.510000,Inf
8.010000,7.510000,Inf
8.510000,7.510000,Inf
9.010000,7.510000,Inf
9.510000,7.510000,Inf
0.010000,7.010000,0.185683
0.510000,7.010000,0.192852
1.010000,7.010000,0.200520
1.510000,7.010000,0.208262
2.010000,7.010000,0.215825
2.510000,7.010000,0.223087
3.010000,7.010000,0.228761
3.510000,7.010000,0.230938
4.010000,7.010000,0.224917
4.510000,7.010000,0.178587
5.010000,7.010000,Inf
5.510000,7.010000,Inf
6.010000,7.010000,Inf
6.510000,7.010000,Inf
7.010000,7.010000,Inf
7.510000,7.010000,Inf
8.010000,7.010000,Inf
8.510000,7.010000,Inf
9.010000,7.010000,Inf
9.510000,7.010000,Inf
0.010000,6.510000,0.185449
0.510000,6.510000,0.192737
1.010000,6.510000,0.200327
1.510000,6.510000,0.207944
2.010000,6.510000,0.215597
2.510000,6.510000,0.222791
3.010000,6.510000,0.228464
3.510000,6.510000,0.230496
4.010000,6.510000,0.224379
4.510000,6.510000,0.178484
5.010000,6.510000,Inf
5.510000,6.510000,Inf
6.010000,6.510000,Inf
6.510000,6.510000,Inf
7.010000,6.510000,Inf
7.510000,6.510000,Inf
8.010000,6.510000,Inf
8.510000,6.510000,Inf
9.010000,6.510000,Inf
9.510000,6.510000,Inf
0.010000,6.010000,0.185360
0.510000,6.010000,0.192577
1.010000,6.010000,0.200048
1.510000,6.010000,0.207754
2.010000,6.010000,0.215484
2.510000,6.010000,0.222551
3.010000,6.010000,0.228049
3.510000,6.010000,0.230160
4.010000,6.010000,0.223921
4.510000,6.010000,0.178393
5.010000,6.010000,Inf
5.510000,6.010000,Inf
6.010000,6.010000,Inf
6.510000,6.010000,Inf
7.010000,6.010000,Inf
7.510000,6.010000,Inf
8.010000,6.010000,Inf
8.510000,6.010000,Inf
9.010000,6.010000,Inf
9.510000,6.010000,Inf
0.010000,5.510000,0.185253
0.510000,5.510000,0.192455
1.010000,5.510000,0.199910
1.510000,5.510000,0.207588
2.010000,5.510000,0.215239
2.510000,5.510000,0.222300
3.010000,5.510000,0.227709
3.510000,5.510000,0.229589
4.010000,5.510000,0.223358
4.510000,5.510000,0.178338
5.010000,5.510000,Inf
5.510000,5.510000,Inf
6.010000,5.510000,Inf
6.510000,5.510000,Inf
7.010000,5.510000,Inf
7.510000,5.510000,Inf
8.010000,5.510000,Inf
8.510000,5.510000,Inf
9.010000,5.510000,Inf
9.510000,5.510000,Inf
0.010000,5.010000,0.185212
0.510000,5.010000,0.192342
1.010000,5.010000,0.199840
1.510000,5.010000,0.207569
2.010000,5.010000,0.215052
2.510000,5.010000,0.222075
3.010000,5.010000,0.227338
3.510000,5.010000,0.229252
4.010000,5.010000,0.222866
4.510000,5.010000,0.178306
5.010000,5.010000,Inf
5.510000,5.010000,Inf
6.010000,5.010000,Inf
6.510000,5.010000,Inf
7.010000,5.010000,Inf
7.510000,5.010000,Inf
8.010000,5.010000,Inf
8.510000,5.010000,Inf
9.010000,5.010000,Inf
9.510000,5.010000,Inf
0.010000,4.510000,0.185103
0.510000,4.510000,0.192221
1.010000,4.510000,0.199782
1.510000,4.510000,0.207302
2.010000,4.510000,0.214805
2.510000,4.510000,0.221791
3.010000,4.510000,0.227065
3.510000,4.510000,0.228890
4.010000,4.510000,0.222379
4.510000,4.510000,0.178317
5.010000,4.510000,Inf
5.510000,4.510000,Inf
6.010000,4.510000,Inf
6.510000,4.510000,Inf
7.010000,4.510000,Inf
7.510000,4.510000,Inf
8.010000,4.510000,Inf
8.510000,4.510000,Inf
9.010000,4.510000,Inf
9.510000,4.510000,Inf
0.010000,4.010000,0.184948
0.510000,4.010000,0.192145
1.010000,4.010000,0.199581
1.510000,4.010000,0.207232
2.010000,4.010000,0.214750
2.510000,4.010000,0.221632
3.010000,4.010000,0.226826
3.510000,4.010000,0.228273
4.010000,4.010000,0.221846
4.510000,4.010000,0.178335
5.010000,4.010000,Inf
5.510000,4.010000,Inf
6.010000,4.010000,Inf
6.510000,4.010000,Inf
7.010000,4.010000,Inf
7.510000,4.010000,Inf
8.010000,4.010000,Inf
8.510000,4.010000,Inf
9.010000,4.010000,Inf
9.510000,4.010000,Inf
0.010000,3.510000,0.184966
0.510000,3.510000,0.192145
1.010000,3.510000,0.199604
1.510000,3.510000,0.207153
2.010000,3.510000,0.214540
2.510000,3.510000,0.221498
3.010000,3.510000,0.226604
3.510000,3.510000,0.228131
4.010000,3.510000,0.221553
4.510000,3.510000,0.178335
5.010000,3.510000,Inf
5.510000,3.510000,Inf
6.010000,3.510000,Inf
6.510000,3.510000,Inf
7.010000,3.510000,Inf
7.510000,3.510000,Inf
8.010000,3.510000,Inf
8.510000,3.510000,Inf
9.010000,3.510000,Inf
9.510000,3.510000,Inf
0.010000,3.010000,0.184927
0.510000,3.010000,0.192033
1.010000,3.010000,0.199545
1.510000,3.010000,0.207045
2.010000,3.010000,0.214451
2.510000,3.010000,0.221342
3.010000,3.010000,0.226440
3.510000,3.010000,0.227826
4.010000,3.010000,0.221194
4.510000,3.010000,0.178378
5.010000,3.010000,Inf
5.510000,3.010000,Inf
6.010000,3.010000,Inf
6.510000,3.010000,Inf
7.010000,3.010000,Inf
7.510000,3.010000,Inf
8.010000,3.010000,Inf
8.510000,3.010000,Inf
9.010000,3.010000,Inf
9.510000,3.010000,Inf
0.010000,2.510000,0.184838
0.510000,2.510000,0.192014
1.010000,2.510000,0.199375
1.510000,2.510000,0.206913
2.010000,2.510000,0.214531
2.510000,2.510000,0.221227
3.010000,2.510000,0.226159
3.510000,2.510000,0.227561
4.010000,2.510000,0.220937
4.510000,2.510000,0.178433
5.010000,2.510000,Inf
5.510000,2.510000,Inf
6.010000,2.510000,Inf
6.510000,2.510000,Inf
7.010000,2.510000,Inf
7.510000,2.510000,Inf
8.010000,2.510000,Inf
8.510000,2.510000,Inf
9.010000,2.510000,Inf
9.510000,2.510000,Inf
0.010000,2.010000,0.184815
0.510000,2.010000,0.191845
1.010000,2.010000,0.199275
1.510000,2.010000,0.206811
2.010000,2.010000,0.214190
2.510000,2.010000,0.220967
3.010000,2.010000,0.226218
3.510000,2.010000,0.227329
4.010000,2.010000,0.220588
4.510000,2.010000,0.178429
5.010000,2.010000,Inf
5.510000,2.010000,Inf
6.010000,2.010000,Inf
6.510000,2.010000,Inf
7.010000,2.010000,Inf
7.510000,2.010000,Inf
8.010000,2.010000,Inf
8.510000,2.010000,Inf
9.010000,2.010000,Inf
9.510000,2.010000,Inf
0.010000,1.510000,0.184696
0.510000,1.510000,0.191723
1.010000,1.510000,0.199133
1.510000,1.510000,0.206639
2.010000,1.510000,0.214062
2.510000,1.510000,0.220803
3.010000,1.510000,0.225840
3.510000,1.510000,0.227229
4.010000,1.510000,0.220379
4.510000,1.510000,0.178427
5.010000,1.510000,Inf
5.510000,1.510000,Inf
6.010000,1.510000,Inf
6.510000,1.510000,Inf
7.010000,1.510000,Inf
7.510000,1.510000,Inf
8.010000,1.510000,Inf
8.510000,1.510000,Inf
9.010000,1.510000,Inf
9.510000,1.510000,Inf
0.010000,1.010000,0.184477
0.510000,1.010000,0.191576
1.010000,1.010000,0.199116
1.510000,1.010000,0.206534
2.010000,1.010000,0.213835
2.510000,1.010000,0.220543
3.010000,1.010000,0.225626
3.510000,1.010000,0.226901
4.010000,1.010000,0.220343
4.510000,1.010000,0.178467
5.010000,1.010000,Inf
5.510000,1.010000,Inf
6.010000,1.010000,Inf
6.510000,1.010000,Inf
7.010000,1.010000,Inf
7.510000,1.010000,Inf
8.010000,1.010000,Inf
8.510000,1.010000,Inf
9.010000,1.010000,Inf
9.510000,1.010000,Inf
0.010000,0.510000,0.184375
0.510000,0.510000,0.191530
1.010000,0.510000,0.199019
1.510000,0.510000,0.206495
2.010000,0.510000,0.213797
2.510000,0.510000,0.220436
3.010000,0.510000,0.225413
3.510000,0.510000,0.226629
4.010000,0.510000,0.220106
4.510000,0.510000,0.178477
5.010000,0.510000,Inf
5.510000,0.510000,Inf
6.010000,0.510000,Inf
6.510000,0.510000,Inf
7.010000,0.510000,Inf
7.510000,0.510000,Inf
8.010000,0.510000,Inf
8.510000,0.510000,Inf
9.010000,0.510000,Inf
9.510000,0.510000,Inf
0.010000,0.010000,0.184278
0.510000,0.010000,0.191337
1.010000,0.010000,0.198869
1.510000,0.010000,0.206307
2.010000,0.010000,0.213570
2.510000,0.010000,0.220296
3.010000,0.010000,0.225113
3.510000,0.010000,0.226388
4.010000,0.010000,0.219852
4.510000,0.010000,0.178561
5.010000,0.010000,Inf
5.510000,0.010000,Inf
6.010000,0.010000,Inf
6.510000,0.010000,Inf
7.010000,0.010000,Inf
7.510000,0.010000,Inf
8.010000,0.010000,Inf
8.510000,0.010000,Inf
9.010000,0.010000,Inf
9.510000,0.010000,Inf
答案1
反转这两个\addplot
命令。第二个命令覆盖了第一个命令的情节。
\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[x dir=reverse,
restrict z to domain=-inf:inf,
view={45}{45},
y tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
x tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
z tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd},
grid=major,
xlabel = $\mu_1$,
ylabel = $\mu_2$,
zlabel = $\gamma$]
\addplot3 [surf,shader=faceted,colormap/redyellow] table[x=b, y=a, z=c, col sep=comma] {Figure2_B.csv};
\addplot3 [surf,shader=faceted,colormap/greenyellow] table[x=b, y=a, z=c, col sep=comma] {Figure2_A.csv};
\end{axis}
\end{tikzpicture}
\end{document}