我想生成使用 matlab2tikz 创建的平滑曲面图。但是,如果我使用所需的文档,内存[shader = faceted interp]
将从[shader = flat corner]
34KB 增加到大约 3000 KB。
是否有可能使用更少的内存来生成插值表面颜色?
这是由 matlab2tikz 生成的 TikZ 代码:
\setlength\figureheight{5cm}
\setlength\figurewidth{5cm}
\begin{tikzpicture}
\begin{axis}[%
width=0.951\figurewidth,
height=\figureheight,
at={(0\figurewidth,0\figureheight)},
scale only axis,
xmin=0,
xmax=2,
tick align=outside,
xlabel style={font=\color{white!15!black}},
xlabel={x},
ymin=0,
ymax=2,
ylabel style={font=\color{white!15!black}},
ylabel={y},
zmin=0.7,
zmax=1.1,
zlabel style={font=\color{white!15!black}},
zlabel={z},
view={83.7}{27.6},
axis background/.style={fill=white},
axis x line*=bottom,
axis y line*=left,
axis z line*=left,
xmajorgrids,
ymajorgrids,
zmajorgrids
]
\addplot3[%
surf,
%shader=faceted interp, faceted color=black, colormap={mymap}{[1pt] %% needs a lot space and slow down pdf
shader=flat corner, draw=black, z buffer=sort, colormap={mymap}{[1pt]
rgb(0pt)=(0.2081,0.1663,0.5292); rgb(1pt)=(0.211624,0.189781,0.577676); rgb(2pt)=(0.212252,0.213771,0.626971); rgb(3pt)=(0.2081,0.2386,0.677086); rgb(4pt)=(0.195905,0.264457,0.7279); rgb(5pt)=(0.170729,0.291938,0.779248); rgb(6pt)=(0.125271,0.324243,0.830271); rgb(7pt)=(0.0591333,0.359833,0.868333); rgb(8pt)=(0.0116952,0.38751,0.881957); rgb(9pt)=(0.00595714,0.408614,0.882843); rgb(10pt)=(0.0165143,0.4266,0.878633); rgb(11pt)=(0.0328524,0.443043,0.871957); rgb(12pt)=(0.0498143,0.458571,0.864057); rgb(13pt)=(0.0629333,0.47369,0.855438); rgb(14pt)=(0.0722667,0.488667,0.8467); rgb(15pt)=(0.0779429,0.503986,0.838371); rgb(16pt)=(0.0793476,0.520024,0.831181); rgb(17pt)=(0.0749429,0.537543,0.826271); rgb(18pt)=(0.0640571,0.556986,0.823957); rgb(19pt)=(0.0487714,0.577224,0.822829); rgb(20pt)=(0.0343429,0.596581,0.819852); rgb(21pt)=(0.0265,0.6137,0.8135); rgb(22pt)=(0.0238905,0.628662,0.803762); rgb(23pt)=(0.0230905,0.641786,0.791267); rgb(24pt)=(0.0227714,0.653486,0.776757); rgb(25pt)=(0.0266619,0.664195,0.760719); rgb(26pt)=(0.0383714,0.674271,0.743552); rgb(27pt)=(0.0589714,0.683757,0.725386); rgb(28pt)=(0.0843,0.692833,0.706167); rgb(29pt)=(0.113295,0.7015,0.685857); rgb(30pt)=(0.145271,0.709757,0.664629); rgb(31pt)=(0.180133,0.717657,0.642433); rgb(32pt)=(0.217829,0.725043,0.619262); rgb(33pt)=(0.258643,0.731714,0.595429); rgb(34pt)=(0.302171,0.737605,0.571186); rgb(35pt)=(0.348167,0.742433,0.547267); rgb(36pt)=(0.395257,0.7459,0.524443); rgb(37pt)=(0.44201,0.748081,0.503314); rgb(38pt)=(0.487124,0.749062,0.483976); rgb(39pt)=(0.530029,0.749114,0.466114); rgb(40pt)=(0.570857,0.748519,0.44939); rgb(41pt)=(0.609852,0.747314,0.433686); rgb(42pt)=(0.6473,0.7456,0.4188); rgb(43pt)=(0.683419,0.743476,0.404433); rgb(44pt)=(0.71841,0.741133,0.390476); rgb(45pt)=(0.752486,0.7384,0.376814); rgb(46pt)=(0.785843,0.735567,0.363271); rgb(47pt)=(0.818505,0.732733,0.34979); rgb(48pt)=(0.850657,0.7299,0.336029); rgb(49pt)=(0.882433,0.727433,0.3217); rgb(50pt)=(0.913933,0.725786,0.306276); rgb(51pt)=(0.944957,0.726114,0.288643); rgb(52pt)=(0.973895,0.731395,0.266648); rgb(53pt)=(0.993771,0.745457,0.240348); rgb(54pt)=(0.999043,0.765314,0.216414); rgb(55pt)=(0.995533,0.786057,0.196652); rgb(56pt)=(0.988,0.8066,0.179367); rgb(57pt)=(0.978857,0.827143,0.163314); rgb(58pt)=(0.9697,0.848138,0.147452); rgb(59pt)=(0.962586,0.870514,0.1309); rgb(60pt)=(0.958871,0.8949,0.113243); rgb(61pt)=(0.959824,0.921833,0.0948381); rgb(62pt)=(0.9661,0.951443,0.0755333); rgb(63pt)=(0.9763,0.9831,0.0538)}, mesh/rows=20]
table[row sep=crcr, point meta=\thisrow{c}] {%
%
x y z c\\
0.1 0.1 0.978841075217739 0.978841075217739\\
0.1 0.2 0.90998429116849 0.90998429116849\\
0.1 0.3 0.84264491860518 0.84264491860518\\
0.1 0.4 0.822508193647424 0.822508193647424\\
0.1 0.5 0.825031045419041 0.825031045419041\\
0.1 0.6 0.839296294190743 0.839296294190743\\
0.1 0.7 0.854739323543296 0.854739323543296\\
0.1 0.8 0.873187961726909 0.873187961726909\\
0.1 0.9 0.878136537605571 0.878136537605571\\
0.1 1 0.898159781327697 0.898159781327697\\
0.1 1.1 0.915302440665068 0.915302440665068\\
0.1 1.2 0.921384089450824 0.921384089450824\\
0.1 1.3 0.942018006411024 0.942018006411024\\
0.1 1.4 0.960927126006636 0.960927126006636\\
0.1 1.5 0.980016318329441 0.980016318329441\\
0.1 1.6 0.999172510007288 0.999172510007288\\
0.1 1.7 1.02055958265134 1.02055958265134\\
0.1 1.8 1.04245974720617 1.04245974720617\\
0.1 1.9 1.0611756436709 1.0611756436709\\
0.1 2 1.08304405264348 1.08304405264348\\
0.2 0.1 0.901517592937543 0.901517592937543\\
0.2 0.2 0.845308244886481 0.845308244886481\\
0.2 0.3 0.812389191861843 0.812389191861843\\
0.2 0.4 0.80674080950615 0.80674080950615\\
0.2 0.5 0.814264175227832 0.814264175227832\\
0.2 0.6 0.827230555363258 0.827230555363258\\
0.2 0.7 0.849345314854172 0.849345314854172\\
0.2 0.8 0.86386095216901 0.86386095216901\\
0.2 0.9 0.869070006138945 0.869070006138945\\
0.2 1 0.893694183833425 0.893694183833425\\
0.2 1.1 0.900051213790277 0.900051213790277\\
0.2 1.2 0.917140765673604 0.917140765673604\\
0.2 1.3 0.938685870862939 0.938685870862939\\
0.2 1.4 0.962161430012622 0.962161430012622\\
0.2 1.5 0.975926478340179 0.975926478340179\\
0.2 1.6 0.998569582335257 0.998569582335257\\
0.2 1.7 1.02464897196027 1.02464897196027\\
0.2 1.8 1.03927757515357 1.03927757515357\\
0.2 1.9 1.06049698036121 1.06049698036121\\
0.2 2 1.0825261428323 1.0825261428323\\
0.3 0.1 0.840108237457957 0.840108237457957\\
0.3 0.2 0.81074249893045 0.81074249893045\\
0.3 0.3 0.787694162734884 0.787694162734884\\
0.3 0.4 0.778155797185172 0.778155797185172\\
0.3 0.5 0.795764863079293 0.795764863079293\\
0.3 0.6 0.801148911384305 0.801148911384305\\
0.3 0.7 0.825000718709587 0.825000718709587\\
0.3 0.8 0.842325496362006 0.842325496362006\\
0.3 0.9 0.852678673500759 0.852678673500759\\
0.3 1 0.876176428665697 0.876176428665697\\
0.3 1.1 0.894293671109834 0.894293671109834\\
0.3 1.2 0.908654860197797 0.908654860197797\\
0.3 1.3 0.939816241843869 0.939816241843869\\
0.3 1.4 0.957774759147845 0.957774759147845\\
0.3 1.5 0.974336058782874 0.974336058782874\\
0.3 1.6 0.996556384387772 0.996556384387772\\
0.3 1.7 1.02090246978518 1.02090246978518\\
0.3 1.8 1.0347269265277 1.0347269265277\\
0.3 1.9 1.05426463203764 1.05426463203764\\
0.3 2 1.07765728904274 1.07765728904274\\
0.4 0.1 0.806044093483461 0.806044093483461\\
0.4 0.2 0.783666254821702 0.783666254821702\\
0.4 0.3 0.768073822199392 0.768073822199392\\
0.4 0.4 0.759954611857678 0.759954611857678\\
0.4 0.5 0.770758619081365 0.770758619081365\\
0.4 0.6 0.777579011944236 0.777579011944236\\
0.4 0.7 0.801063474151775 0.801063474151775\\
0.4 0.8 0.81554730984072 0.81554730984072\\
0.4 0.9 0.838862096700037 0.838862096700037\\
0.4 1 0.864517116101439 0.864517116101439\\
0.4 1.1 0.884832843903749 0.884832843903749\\
0.4 1.2 0.902876045937127 0.902876045937127\\
0.4 1.3 0.922053510642663 0.922053510642663\\
0.4 1.4 0.949054241524677 0.949054241524677\\
0.4 1.5 0.96845673508519 0.96845673508519\\
0.4 1.6 0.998185751415727 0.998185751415727\\
0.4 1.7 1.02110017629038 1.02110017629038\\
0.4 1.8 1.03274150757595 1.03274150757595\\
0.4 1.9 1.05823172569181 1.05823172569181\\
0.4 2 1.07487227105116 1.07487227105116\\
0.5 0.1 0.786221538440771 0.786221538440771\\
0.5 0.2 0.76114307300512 0.76114307300512\\
0.5 0.3 0.742287262086799 0.742287262086799\\
0.5 0.4 0.737496156695126 0.737496156695126\\
0.5 0.5 0.747143245047922 0.747143245047922\\
0.5 0.6 0.767751341050701 0.767751341050701\\
0.5 0.7 0.789479918321806 0.789479918321806\\
0.5 0.8 0.81201778996086 0.81201778996086\\
0.5 0.9 0.82982883997617 0.82982883997617\\
0.5 1 0.856644097100447 0.856644097100447\\
0.5 1.1 0.877086361732628 0.877086361732628\\
0.5 1.2 0.895129007326909 0.895129007326909\\
0.5 1.3 0.919948311388728 0.919948311388728\\
0.5 1.4 0.939205155814864 0.939205155814864\\
0.5 1.5 0.958121108057538 0.958121108057538\\
0.5 1.6 0.99330891429114 0.99330891429114\\
0.5 1.7 1.00974618575332 1.00974618575332\\
0.5 1.8 1.02755504703871 1.02755504703871\\
0.5 1.9 1.04766230637917 1.04766230637917\\
0.5 2 1.0726790376252 1.0726790376252\\
0.6 0.1 0.767520626143775 0.767520626143775\\
0.6 0.2 0.742031835458354 0.742031835458354\\
0.6 0.3 0.731720410171416 0.731720410171416\\
0.6 0.4 0.728388656103022 0.728388656103022\\
0.6 0.5 0.739944071974886 0.739944071974886\\
0.6 0.6 0.75788436010147 0.75788436010147\\
0.6 0.7 0.783668342121399 0.783668342121399\\
0.6 0.8 0.798410431908164 0.798410431908164\\
0.6 0.9 0.825185453651715 0.825185453651715\\
0.6 1 0.847950200459786 0.847950200459786\\
0.6 1.1 0.866422060891867 0.866422060891867\\
0.6 1.2 0.891701058193423 0.891701058193423\\
0.6 1.3 0.914615830783623 0.914615830783623\\
0.6 1.4 0.930364345587849 0.930364345587849\\
0.6 1.5 0.954816779153812 0.954816779153812\\
0.6 1.6 0.991526677196553 0.991526677196553\\
0.6 1.7 1.00715278305568 1.00715278305568\\
0.6 1.8 1.02314281122654 1.02314281122654\\
0.6 1.9 1.04575866066752 1.04575866066752\\
0.6 2 1.06934114281413 1.06934114281413\\
0.7 0.1 0.748377681905337 0.748377681905337\\
0.7 0.2 0.733124349714245 0.733124349714245\\
0.7 0.3 0.721516592031303 0.721516592031303\\
0.7 0.4 0.72318232286585 0.72318232286585\\
0.7 0.5 0.735229316401413 0.735229316401413\\
0.7 0.6 0.752186007949691 0.752186007949691\\
0.7 0.7 0.775501490842304 0.775501490842304\\
0.7 0.8 0.794955936908431 0.794955936908431\\
0.7 0.9 0.820001704265096 0.820001704265096\\
0.7 1 0.841983066781254 0.841983066781254\\
0.7 1.1 0.86536354549422 0.86536354549422\\
0.7 1.2 0.884018750197522 0.884018750197522\\
0.7 1.3 0.913991283172279 0.913991283172279\\
0.7 1.4 0.930936780617865 0.930936780617865\\
0.7 1.5 0.954497280390417 0.954497280390417\\
0.7 1.6 0.982937188367808 0.982937188367808\\
0.7 1.7 1.0011981622668 1.0011981622668\\
0.7 1.8 1.01853548211128 1.01853548211128\\
0.7 1.9 1.04234119170029 1.04234119170029\\
0.7 2 1.06487576399598 1.06487576399598\\
0.8 0.1 0.738615607994289 0.738615607994289\\
0.8 0.2 0.725833008539767 0.725833008539767\\
0.8 0.3 0.716739347356482 0.716739347356482\\
0.8 0.4 0.719975228738095 0.719975228738095\\
0.8 0.5 0.731956799531611 0.731956799531611\\
0.8 0.6 0.748189949947983 0.748189949947983\\
0.8 0.7 0.769921047439094 0.769921047439094\\
0.8 0.8 0.793983477447599 0.793983477447599\\
0.8 0.9 0.815703547121726 0.815703547121726\\
0.8 1 0.840228003206245 0.840228003206245\\
0.8 1.1 0.863124156665619 0.863124156665619\\
0.8 1.2 0.882416970126478 0.882416970126478\\
0.8 1.3 0.908172671660765 0.908172671660765\\
0.8 1.4 0.927914172996887 0.927914172996887\\
0.8 1.5 0.955265592439137 0.955265592439137\\
0.8 1.6 0.974701706486713 0.974701706486713\\
0.8 1.7 0.998643334841134 0.998643334841134\\
0.8 1.8 1.01573531811547 1.01573531811547\\
0.8 1.9 1.0375239915276 1.0375239915276\\
0.8 2 1.06180544430015 1.06180544430015\\
0.9 0.1 0.73381325159502 0.73381325159502\\
0.9 0.2 0.722696741614367 0.722696741614367\\
0.9 0.3 0.713356842388709 0.713356842388709\\
0.9 0.4 0.719115164750297 0.719115164750297\\
0.9 0.5 0.728668834649488 0.728668834649488\\
0.9 0.6 0.74726467783588 0.74726467783588\\
0.9 0.7 0.769320004068283 0.769320004068283\\
0.9 0.8 0.790917732508032 0.790917732508032\\
0.9 0.9 0.814120121395352 0.814120121395352\\
0.9 1 0.838178654970782 0.838178654970782\\
0.9 1.1 0.858124482308035 0.858124482308035\\
0.9 1.2 0.880892394673511 0.880892394673511\\
0.9 1.3 0.90871921844365 0.90871921844365\\
0.9 1.4 0.929978350395919 0.929978350395919\\
0.9 1.5 0.953000394001449 0.953000394001449\\
0.9 1.6 0.970867006274554 0.970867006274554\\
0.9 1.7 0.99662847116877 0.99662847116877\\
0.9 1.8 1.01222237661281 1.01222237661281\\
0.9 1.9 1.035138248292 1.035138248292\\
0.9 2 1.05632756969827 1.05632756969827\\
1 0.1 0.731570088242015 0.731570088242015\\
1 0.2 0.720959334316133 0.720959334316133\\
1 0.3 0.712203003551029 0.712203003551029\\
1 0.4 0.716766659011145 0.716766659011145\\
1 0.5 0.726282678157855 0.726282678157855\\
1 0.6 0.745457784700382 0.745457784700382\\
1 0.7 0.765746912021968 0.765746912021968\\
1 0.8 0.788100219682612 0.788100219682612\\
1 0.9 0.810481162330993 0.810481162330993\\
1 1 0.836284160200144 0.836284160200144\\
1 1.1 0.853703760819099 0.853703760819099\\
1 1.2 0.879650436231888 0.879650436231888\\
1 1.3 0.906547755206366 0.906547755206366\\
1 1.4 0.923620729633152 0.923620729633152\\
1 1.5 0.953369733648842 0.953369733648842\\
1 1.6 0.971580615939404 0.971580615939404\\
1 1.7 0.995247740283718 0.995247740283718\\
1 1.8 1.01071377299285 1.01071377299285\\
1 1.9 1.03336329955949 1.03336329955949\\
1 2 1.05411382247168 1.05411382247168\\
1.1 0.1 0.730620840194746 0.730620840194746\\
1.1 0.2 0.719076031318867 0.719076031318867\\
1.1 0.3 0.712307187674868 0.712307187674868\\
1.1 0.4 0.717775972819857 0.717775972819857\\
1.1 0.5 0.727467387173488 0.727467387173488\\
1.1 0.6 0.743908928357703 0.743908928357703\\
1.1 0.7 0.763624727955782 0.763624727955782\\
1.1 0.8 0.786224189102775 0.786224189102775\\
1.1 0.9 0.806828676042996 0.806828676042996\\
1.1 1 0.837389405734421 0.837389405734421\\
1.1 1.1 0.853887223307221 0.853887223307221\\
1.1 1.2 0.878161960878753 0.878161960878753\\
1.1 1.3 0.904389239042539 0.904389239042539\\
1.1 1.4 0.925876918179837 0.925876918179837\\
1.1 1.5 0.952405247590915 0.952405247590915\\
1.1 1.6 0.968411682330186 0.968411682330186\\
1.1 1.7 0.99490159383852 0.99490159383852\\
1.1 1.8 1.01223255704789 1.01223255704789\\
1.1 1.9 1.03384571496621 1.03384571496621\\
1.1 2 1.05315220054647 1.05315220054647\\
1.2 0.1 0.729906459904575 0.729906459904575\\
1.2 0.2 0.720213978720516 0.720213978720516\\
1.2 0.3 0.713087529542312 0.713087529542312\\
1.2 0.4 0.71751619037312 0.71751619037312\\
1.2 0.5 0.727711233967286 0.727711233967286\\
1.2 0.6 0.742147909156799 0.742147909156799\\
1.2 0.7 0.762227481703253 0.762227481703253\\
1.2 0.8 0.784009917781053 0.784009917781053\\
1.2 0.9 0.803941492605094 0.803941492605094\\
1.2 1 0.834653008889183 0.834653008889183\\
1.2 1.1 0.854510891788164 0.854510891788164\\
1.2 1.2 0.876528683896908 0.876528683896908\\
1.2 1.3 0.902638964000437 0.902638964000437\\
1.2 1.4 0.924609165199364 0.924609165199364\\
1.2 1.5 0.951730811283202 0.951730811283202\\
1.2 1.6 0.967226112704261 0.967226112704261\\
1.2 1.7 0.993545172168392 0.993545172168392\\
1.2 1.8 1.00778226972188 1.00778226972188\\
1.2 1.9 1.03234910180213 1.03234910180213\\
1.2 2 1.05212019287219 1.05212019287219\\
1.3 0.1 0.729651064625984 0.729651064625984\\
1.3 0.2 0.720020669871435 0.720020669871435\\
1.3 0.3 0.712698507671128 0.712698507671128\\
1.3 0.4 0.717592060724005 0.717592060724005\\
1.3 0.5 0.726685735621494 0.726685735621494\\
1.3 0.6 0.7414075741957 0.7414075741957\\
1.3 0.7 0.76151861649234 0.76151861649234\\
1.3 0.8 0.784421764161607 0.784421764161607\\
1.3 0.9 0.802436307470162 0.802436307470162\\
1.3 1 0.830201609200774 0.830201609200774\\
1.3 1.1 0.852774280284818 0.852774280284818\\
1.3 1.2 0.876471284765236 0.876471284765236\\
1.3 1.3 0.903750809778979 0.903750809778979\\
1.3 1.4 0.923387317829927 0.923387317829927\\
1.3 1.5 0.950684066004776 0.950684066004776\\
1.3 1.6 0.968377881135496 0.968377881135496\\
1.3 1.7 0.994258733062232 0.994258733062232\\
1.3 1.8 1.00713010645702 1.00713010645702\\
1.3 1.9 1.03088069294213 1.03088069294213\\
1.3 2 1.0508829618822 1.0508829618822\\
1.4 0.1 0.730500352397979 0.730500352397979\\
1.4 0.2 0.718632453408666 0.718632453408666\\
1.4 0.3 0.714918794234679 0.714918794234679\\
1.4 0.4 0.718076851201417 0.718076851201417\\
1.4 0.5 0.727298596713765 0.727298596713765\\
1.4 0.6 0.740853706219955 0.740853706219955\\
1.4 0.7 0.760955054102585 0.760955054102585\\
1.4 0.8 0.782730556156467 0.782730556156467\\
1.4 0.9 0.804521236090417 0.804521236090417\\
1.4 1 0.829300952859081 0.829300952859081\\
1.4 1.1 0.850258446081032 0.850258446081032\\
1.4 1.2 0.872242886771831 0.872242886771831\\
1.4 1.3 0.905701939103503 0.905701939103503\\
1.4 1.4 0.925019558857037 0.925019558857037\\
1.4 1.5 0.950890385480101 0.950890385480101\\
1.4 1.6 0.967382013106045 0.967382013106045\\
1.4 1.7 0.992097384003499 0.992097384003499\\
1.4 1.8 1.00784770485417 1.00784770485417\\
1.4 1.9 1.03019014002333 1.03019014002333\\
1.4 2 1.05125342460208 1.05125342460208\\
1.5 0.1 0.730476396722479 0.730476396722479\\
1.5 0.2 0.719693682459182 0.719693682459182\\
1.5 0.3 0.714896787701737 0.714896787701737\\
1.5 0.4 0.716002996175453 0.716002996175453\\
1.5 0.5 0.728765621095059 0.728765621095059\\
1.5 0.6 0.742758786185624 0.742758786185624\\
1.5 0.7 0.761716274808384 0.761716274808384\\
1.5 0.8 0.787757986106999 0.787757986106999\\
1.5 0.9 0.804491117272064 0.804491117272064\\
1.5 1 0.827471797723261 0.827471797723261\\
1.5 1.1 0.851350386823121 0.851350386823121\\
1.5 1.2 0.86984021176277 0.86984021176277\\
1.5 1.3 0.902036031517553 0.902036031517553\\
1.5 1.4 0.925354176597143 0.925354176597143\\
1.5 1.5 0.949006814107748 0.949006814107748\\
1.5 1.6 0.969285808974643 0.969285808974643\\
1.5 1.7 0.993112771302155 0.993112771302155\\
1.5 1.8 1.00799673047704 1.00799673047704\\
1.5 1.9 1.02859321865792 1.02859321865792\\
1.5 2 1.05154113735594 1.05154113735594\\
1.6 0.1 0.730911754267116 0.730911754267116\\
1.6 0.2 0.720152867892698 0.720152867892698\\
1.6 0.3 0.714752056139892 0.714752056139892\\
1.6 0.4 0.71634666992016 0.71634666992016\\
1.6 0.5 0.727388886833378 0.727388886833378\\
1.6 0.6 0.741506758734714 0.741506758734714\\
1.6 0.7 0.762659163521951 0.762659163521951\\
1.6 0.8 0.786175783608803 0.786175783608803\\
1.6 0.9 0.803967039786284 0.803967039786284\\
1.6 1 0.825736221914219 0.825736221914219\\
1.6 1.1 0.849467310689363 0.849467310689363\\
1.6 1.2 0.871473109288985 0.871473109288985\\
1.6 1.3 0.899097016378464 0.899097016378464\\
1.6 1.4 0.927050519335375 0.927050519335375\\
1.6 1.5 0.951431675326978 0.951431675326978\\
1.6 1.6 0.969335058695662 0.969335058695662\\
1.6 1.7 0.989438712866357 0.989438712866357\\
1.6 1.8 1.00423639535899 1.00423639535899\\
1.6 1.9 1.02900498343802 1.02900498343802\\
1.6 2 1.05028628944502 1.05028628944502\\
1.7 0.1 0.730459434943053 0.730459434943053\\
1.7 0.2 0.721365418585205 0.721365418585205\\
1.7 0.3 0.716735469169561 0.716735469169561\\
1.7 0.4 0.716761673809011 0.716761673809011\\
1.7 0.5 0.72755085135993 0.72755085135993\\
1.7 0.6 0.742775034155235 0.742775034155235\\
1.7 0.7 0.762427035313333 0.762427035313333\\
1.7 0.8 0.785179598509921 0.785179598509921\\
1.7 0.9 0.804805851234325 0.804805851234325\\
1.7 1 0.825512089444753 0.825512089444753\\
1.7 1.1 0.848032218476023 0.848032218476023\\
1.7 1.2 0.871428612072256 0.871428612072256\\
1.7 1.3 0.899283669888992 0.899283669888992\\
1.7 1.4 0.926456900442393 0.926456900442393\\
1.7 1.5 0.950117793183889 0.950117793183889\\
1.7 1.6 0.972041303047067 0.972041303047067\\
1.7 1.7 0.986181225377735 0.986181225377735\\
1.7 1.8 1.00495695672613 1.00495695672613\\
1.7 1.9 1.02942373856282 1.02942373856282\\
1.7 2 1.05022469602013 1.05022469602013\\
1.8 0.1 0.731487432373451 0.731487432373451\\
1.8 0.2 0.721416346731888 0.721416346731888\\
1.8 0.3 0.716073712866048 0.716073712866048\\
1.8 0.4 0.717428803100937 0.717428803100937\\
1.8 0.5 0.72809459427456 0.72809459427456\\
1.8 0.6 0.743685903615773 0.743685903615773\\
1.8 0.7 0.763012652668265 0.763012652668265\\
1.8 0.8 0.785261207603871 0.785261207603871\\
1.8 0.9 0.803232968929889 0.803232968929889\\
1.8 1 0.827854586452875 0.827854586452875\\
1.8 1.1 0.846445408405946 0.846445408405946\\
1.8 1.2 0.872798437757348 0.872798437757348\\
1.8 1.3 0.900170826305474 0.900170826305474\\
1.8 1.4 0.926144369722088 0.926144369722088\\
1.8 1.5 0.949946370304815 0.949946370304815\\
1.8 1.6 0.971462169977234 0.971462169977234\\
1.8 1.7 0.986993547690452 0.986993547690452\\
1.8 1.8 1.00300293740142 1.00300293740142\\
1.8 1.9 1.02825546045441 1.02825546045441\\
1.8 2 1.05176722522217 1.05176722522217\\
1.9 0.1 0.731095209216224 0.731095209216224\\
1.9 0.2 0.723167947004703 0.723167947004703\\
1.9 0.3 0.717018231543776 0.717018231543776\\
1.9 0.4 0.717707450024319 0.717707450024319\\
1.9 0.5 0.727149005941049 0.727149005941049\\
1.9 0.6 0.744324056868581 0.744324056868581\\
1.9 0.7 0.762165184632656 0.762165184632656\\
1.9 0.8 0.784229097616837 0.784229097616837\\
1.9 0.9 0.802399228052846 0.802399228052846\\
1.9 1 0.829167560468727 0.829167560468727\\
1.9 1.1 0.845477699188085 0.845477699188085\\
1.9 1.2 0.87210245543755 0.87210245543755\\
1.9 1.3 0.898783085497325 0.898783085497325\\
1.9 1.4 0.926238114509552 0.926238114509552\\
1.9 1.5 0.949998594496938 0.949998594496938\\
1.9 1.6 0.969847020390359 0.969847020390359\\
1.9 1.7 0.985576870467398 0.985576870467398\\
1.9 1.8 1.00018701172911 1.00018701172911\\
1.9 1.9 1.02848499486974 1.02848499486974\\
1.9 2 1.05075018358905 1.05075018358905\\
2 0.1 0.731078731242849 0.731078731242849\\
2 0.2 0.723521614329132 0.723521614329132\\
2 0.3 0.717354996469584 0.717354996469584\\
2 0.4 0.719720087745422 0.719720087745422\\
2 0.5 0.72882756535578 0.72882756535578\\
2 0.6 0.744558002043 0.744558002043\\
2 0.7 0.761128830450552 0.761128830450552\\
2 0.8 0.780972828699559 0.780972828699559\\
2 0.9 0.802890635242991 0.802890635242991\\
2 1 0.829618224048972 0.829618224048972\\
2 1.1 0.84858175160681 0.84858175160681\\
2 1.2 0.873504870959474 0.873504870959474\\
2 1.3 0.897737070201995 0.897737070201995\\
2 1.4 0.928325986934544 0.928325986934544\\
2 1.5 0.948529565257845 0.948529565257845\\
2 1.6 0.969759923128393 0.969759923128393\\
2 1.7 0.987995797325095 0.987995797325095\\
2 1.8 1.0027068901142 1.0027068901142\\
2 1.9 1.02862381066553 1.02862381066553\\
2 2 1.04930221905372 1.04930221905372\\
};
\end{axis}
\end{tikzpicture}
答案1
这pgfplots 手册在第 139 页对此发出警告:
原则上,这个想法本身并没有什么问题,而且看起来也不错——但它会大大扩大生成的 PDF 文档,并且可能需要很长时间才能渲染
后来,它给出了一种解决方法:
对于正交图(如 view={0}{90}),如果使用两个单独的 \addplot 命令,可以以较低的成本获得分面插值的效果:一个使用 surf,一个使用 mesh。请谨慎处理此选择。
使用这个技巧,我制作了下面的图表,它只有 41K(使用 pdflatex 生成的 pdf,standalone
类):
为此,我将您的表格数据复制到单独的data.txt
文件中,删除\\
每行末尾的,然后在文档中输入以下命令:
\pgfplotstableread{data.txt}\data
这使我能够重复使用两个图(表面和网格)的数据:
\begin{tikzpicture}
\begin{axis}[% options omitted
]
\addplot3[surf,
shader=interp, colormap={mymap}{[1pt] % long colormap omitted
}, mesh/rows=20]
table {\data};
\addplot3[mesh,mesh/rows=20, color=black]
table {\data};
\end{axis}
\end{tikzpicture}
请注意,我删除了point meta=\thisrow{c}
,因为当从外部文件加载表时它不起作用,而且我不知道这个选项的含义(我不是 pgfplots 的常规用户)。
答案2
为了直接从 Matlab 获取所示的解决方案,我现在分割了图。
Matlab代码:
figure
surf (xData, yData, zData, 'EdgeColor', 'none', 'FaceColor', 'interp')
hold on
mesh (xData, yData, zData, 'EdgeColor', 'black', 'FaceColor', 'none')
matlab2tikz (...)