Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use the matlab2tikz package to creat surface in LaTex editor, but it display ugly unlike the Fig. created in the Matlab. Can anyone help me out? Is there a way of adjusting the x,y and z axis ranges with different ratios? Thanks in advance!

Here is my MWE:

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}

\begin{axis}[%
width=11.0276041666667in,
height=0.913361757624398in,
view={-34.5}{32},
scale only axis,
xmin=0,
xmax=124.6,
xmajorgrids,
ymin=-5.16,
ymax=5.16,
ymajorgrids,
zmin=-0.50849813416709,
zmax=1.00241500295172,
zmajorgrids,
axis x line*=bottom,
axis y line*=left,
axis z line*=left
]

\addplot3[%
surf,
colormap/jet,
shader=faceted interp,
mesh/rows=215]
table[row sep=crcr,header=false] {
124.6 5.16 0.00245834984130098\\
124.6 -5.16 -0.0300853482799027\\
124.011214907829 5.16 -0.0135370418770717\\
124.011214907829 -5.16 -0.0483636748913606\\
123.422429845324 5.16 -0.0297011079876108\\
123.422429845324 -5.16 -0.0684925075668529\\
122.833644805243 5.16 -0.0458579043788372\\
122.833644805243 -5.16 -0.0901666015746197\\
122.24485978034 5.16 -0.0618314869392716\\
122.24485978034 -5.16 -0.113080712182901\\
121.656074763371 5.16 -0.0774459115574348\\
121.656074763371 -5.16 -0.136929594659937\\
121.067289747092 5.16 -0.0925252341218476\\
121.067289747092 -5.16 -0.161408004273967\\
120.478504724259 5.16 -0.106893510521031\\
120.478504724259 -5.16 -0.186210696293232\\
119.889719687627 5.16 -0.120374796643505\\
119.889719687627 -5.16 -0.211032425985972\\
119.300934629952 5.16 -0.132793148377792\\
119.300934629952 -5.16 -0.235567948620426\\
118.71214954399 5.16 -0.143972621612411\\
118.71214954399 -5.16 -0.259512019464835\\
118.12336442634 5.16 -0.153823976538202\\
118.12336442634 -5.16 -0.282581403365504\\
117.53457930115 5.16 -0.162879533599953\\
117.53457930115 -5.16 -0.304650646023493\\
116.945794204593 5.16 -0.171942844348157\\
116.945794204593 -5.16 -0.325663144189178\\
116.357009172889 5.16 -0.181818589801119\\
116.357009172889 -5.16 -0.345562581324311\\
115.76822424226 5.16 -0.19331145097714\\
115.76822424226 -5.16 -0.364292640890642\\
115.179439438368 5.16 -0.207115287119426\\
115.179439438368 -5.16 -0.381809574168138\\
114.590654683129 5.16 -0.222835244352622\\
114.590654683129 -5.16 -0.398193098682909\\
114.00186983958 5.16 -0.239458526583429\\
114.00186983958 -5.16 -0.413593010115434\\
113.413084770077 5.16 -0.255965245124939\\
113.413084770077 -5.16 -0.428159908486555\\
112.824299336981 5.16 -0.271335511290247\\
112.824299336981 -5.16 -0.442044393817114\\
112.235513428429 5.16 -0.28461138880528\\
112.235513428429 -5.16 -0.455375466100645\\
111.646727290617 5.16 -0.295695451104695\\
111.646727290617 -5.16 -0.467982104195751\\
111.057941431882 5.16 -0.305120257447062\\
111.057941431882 -5.16 -0.479473639163968\\
110.469156366569 5.16 -0.313432804794809\\
110.469156366569 -5.16 -0.489454368287139\\
109.880372609021 5.16 -0.321180090110363\\
109.880372609021 -5.16 -0.497528588847106\\
109.291590615277 5.16 -0.328885046062938\\
109.291590615277 -5.16 -0.503319162055522\\
108.702809639187 5.16 -0.336574421653107\\
108.702809639187 -5.16 -0.506831720340943\\
108.114027804823 5.16 -0.343808668220827\\
108.114027804823 -5.16 -0.508431612370634\\
107.52524319245 5.16 -0.350130157246391\\
107.52524319245 -5.16 -0.50849813416709\\
106.936453882333 5.16 -0.355081260210092\\
106.936453882333 -5.16 -0.507410581752805\\
106.347658073921 5.16 -0.358214154550374\\
106.347658073921 -5.16 -0.505538763822303\\
105.758857904086 5.16 -0.359404977508339\\
105.758857904086 -5.16 -0.502939055864529\\
105.170060254916 5.16 -0.358920288733003\\
105.170060254916 -5.16 -0.499290097162155\\
104.581272291004 5.16 -0.357049891626036\\
104.581272291004 -5.16 -0.494248038516736\\
103.992501176942 5.16 -0.354083589589109\\
103.992501176942 -5.16 -0.487469030729825\\
103.403753868045 5.16 -0.350308690878921\\
103.403753868045 -5.16 -0.478614341408224\\
102.815024762875 5.16 -0.345862795053773\\
102.815024762875 -5.16 -0.467652246473429\\
102.226288797027 5.16 -0.340651453189456\\
102.226288797027 -5.16 -0.455026884734723\\
101.637519231861 5.16 -0.334560255201975\\
101.637519231861 -5.16 -0.441223329443348\\
101.04868932874 5.16 -0.327474791007333\\
101.04868932874 -5.16 -0.426726653850547\\
100.459772633662 5.16 -0.319281053143255\\
100.459772633662 -5.16 -0.412019787060976\\
99.8707815761551 5.16 -0.309920035495395\\
99.8707815761551 -5.16 -0.39729275060269\\
99.2818066192337 5.16 -0.299443111499199\\
99.2818066192337 -5.16 -0.382147743929335\\
98.6929475528583 5.16 -0.287914847698635\\
98.6929475528583 -5.16 -0.36611670709928\\
98.1043041669895 5.16 -0.275399810637669\\
98.1043041669895 -5.16 -0.348731580170891\\
97.5159760221363 5.16 -0.261962681304634\\
97.5159760221363 -5.16 -0.329524642631773\\
96.9279461174515 5.16 -0.247726278425107\\
96.9279461174515 -5.16 -0.308200604021461\\
96.3398915932526 5.16 -0.232965975062752\\
96.3398915932526 -5.16 -0.284916633051188\\
95.7514400283359 5.16 -0.217981864263998\\
95.7514400283359 -5.16 -0.259903215147184\\
95.1622190014972 5.16 -0.203074039075273\\
95.1622190014972 -5.16 -0.233390835735677\\
94.5718561232485 5.16 -0.188542572978624\\
94.5718561232485 -5.16 -0.20560999015383\\
93.9803165862943 5.16 -0.17447929615653\\
93.9803165862943 -5.16 -0.176896665734152\\
93.3887365596779 5.16 -0.160253702182748\\
93.3887365596779 -5.16 -0.147952771451401\\
92.7985059382545 5.16 -0.145078769561836\\
92.7985059382545 -5.16 -0.119559503762741\\
92.2110146168792 5.16 -0.128167476798355\\
92.2110146168792 -5.16 -0.0924980591253398\\
91.6276524904074 5.16 -0.108732802396864\\
91.6276524904074 -5.16 -0.067549633996362\\
91.0501686126752 5.16 -0.0863259757928153\\
91.0501686126752 -5.16 -0.0452684152582118\\
90.4819696011121 5.16 -0.0620592967490891\\
90.4819696011121 -5.16 -0.0251609122295703\\
89.9269399341717 5.16 -0.0374951078921182\\
89.9269399341717 -5.16 -0.00643159798989736\\
89.3889641352027 5.16 -0.0141957941297012\\
89.3889641352027 -5.16 0.0117150827575436\\
88.8719267275536 5.16 0.00627625963036314\\
88.8719267275536 -5.16 0.0300746853094894\\
88.3780038959451 5.16 0.0227123268322176\\
88.3780038959451 -5.16 0.0493629677219275\\
87.8988291612511 5.16 0.0360862113974958\\
87.8988291612511 -5.16 0.0698032356345549\\
87.4220182849799 5.16 0.048203469297768\\
87.4220182849799 -5.16 0.0914311233986398\\
86.9351791196646 5.16 0.0608712938117892\\
86.9351791196646 -5.16 0.11428189593378\\
86.4259195178384 5.16 0.0758968782183145\\
86.4259195178384 -5.16 0.138390818159575\\
85.883453525421 5.16 0.094876857078085\\
85.883453525421 -5.16 0.163793687048257\\
85.3104333331473 5.16 0.117646234896269\\
85.3104333331473 -5.16 0.190530750966532\\
84.7162072641422 5.16 0.143162208397564\\
84.7162072641422 -5.16 0.218644476379448\\
84.1101726586624 5.16 0.170375548564539\\
84.1101726586624 -5.16 0.248177345989008\\
83.5017268569649 5.16 0.198237026379766\\
83.5017268569649 -5.16 0.279171842497217\\
82.8996787869656 5.16 0.225768316231811\\
82.8996787869656 -5.16 0.31163655132421\\
82.3059970831171 5.16 0.252815344603939\\
82.3059970831171 -5.16 0.345186001988375\\
81.7182372873149 5.16 0.279755813524383\\
81.7182372873149 -5.16 0.379180494394074\\
81.133881389912 5.16 0.306976287947126\\
81.133881389912 -5.16 0.412976091285434\\
80.5504113812614 5.16 0.334863332826151\\
80.5504113812614 -5.16 0.445928855406581\\
79.9654085390389 5.16 0.363773272482593\\
79.9654085390389 -5.16 0.477436925531164\\
79.378121857673 5.16 0.393554483107753\\
79.378121857673 -5.16 0.507605186241167\\
78.7891841486556 5.16 0.42363386207264\\
78.7891841486556 -5.16 0.537124956780007\\
78.1992701103181 5.16 0.453425548981282\\
78.1992701103181 -5.16 0.566705307216056\\
77.6090544409918 5.16 0.482343683437705\\
77.6090544409918 -5.16 0.597055307617682\\
77.0191964432262 5.16 0.509823576669842\\
77.0191964432262 -5.16 0.628853034931425\\
76.4299583469635 5.16 0.535846577257793\\
76.4299583469635 -5.16 0.661977222498642\\
75.8411798603109 5.16 0.560975067828137\\
75.8411798603109 -5.16 0.695456028425124\\
75.25268019959 5.16 0.585799610438877\\
75.25268019959 -5.16 0.728276358971502\\
74.6642785811227 5.16 0.610910767148012\\
74.6642785811227 -5.16 0.759425120398406\\
74.0757963333257 5.16 0.636890903485123\\
74.0757963333257 -5.16 0.787907669844716\\
73.487146945386 5.16 0.663964731383268\\
73.487146945386 -5.16 0.813534464197314\\
72.8983697906526 5.16 0.691868436874628\\
72.8983697906526 -5.16 0.837215661516257\\
72.3095133055073 5.16 0.720303034559864\\
72.3095133055073 -5.16 0.859940592868467\\
71.7206259263318 5.16 0.748969539039638\\
71.7206259263318 -5.16 0.882698589320866\\
71.1317558508364 5.16 0.777567203502448\\
71.1317558508364 -5.16 0.906467255350646\\
70.5429304824813 5.16 0.805641818102081\\
70.5429304824813 -5.16 0.931202516304728\\
69.9541405886593 5.16 0.832468796225283\\
69.9541405886593 -5.16 0.955060266006394\\
69.3653732075218 5.16 0.857296029193753\\
69.3653732075218 -5.16 0.97601317031439\\
68.7766153772201 5.16 0.87937140832919\\
68.7766153772201 -5.16 0.992033895087461\\
68.1878541547636 5.16 0.897944847649775\\
68.1878541547636 -5.16 1.00110020788952\\
67.5990811257314 5.16 0.912751992771678\\
67.5990811257314 -5.16 1.00241500295172\\
67.0102982534909 5.16 0.924641604470226\\
67.0102982534909 -5.16 0.99798870662968\\
66.4215089490548 5.16 0.934617717080566\\
66.4215089490548 -5.16 0.99022338086466\\
65.8327166234359 5.16 0.943684364937846\\
65.8327166234359 -5.16 0.981521087597941\\
65.2439246870578 5.16 0.952845299006288\\
65.2439246870578 -5.16 0.974283396979457\\
64.6551356564309 5.16 0.962674431976003\\
64.6551356564309 -5.16 0.970165893173758\\
64.0663493546142 5.16 0.9724505297176\\
64.0663493546142 -5.16 0.968576428036379\\
63.4775650994052 5.16 0.981209402953593\\
63.4775650994052 -5.16 0.96850120382469\\
62.8887822086013 5.16 0.987986862406498\\
62.8887822086013 -5.16 0.968926422796058\\
62.3 5.16 0.991818718798828\\
62.3 -5.16 0.968838287207852\\
61.7112177913987 5.16 0.992029325287716\\
61.7112177913987 -5.16 0.967317785174214\\
61.1224349005948 5.16 0.989097204768754\\
61.1224349005948 -5.16 0.963825048236384\\
60.5336506453858 5.16 0.983789422572151\\
60.5336506453858 -5.16 0.957914993792379\\
59.9448643435691 5.16 0.976873044028117\\
59.9448643435691 -5.16 0.949142539240214\\
59.3560753129422 5.16 0.96911513446686\\
59.3560753129422 -5.16 0.937062601977904\\
58.7672833765641 5.16 0.961197123011807\\
58.7672833765641 -5.16 0.921383362666899\\
58.1784910509452 5.16 0.953343928760892\\
58.1784910509452 -5.16 0.902630018729716\\
57.5897017465091 5.16 0.945628962520855\\
57.5897017465091 -5.16 0.881598922232666\\
57.0009188742686 5.16 0.938125535216578\\
57.0009188742686 -5.16 0.859086604000787\\
56.4121458452364 5.16 0.930906957772943\\
56.4121458452364 -5.16 0.835889594859115\\
55.8233846227799 5.16 0.923925919463005\\
55.8233846227799 -5.16 0.812706615377532\\
55.2346267924782 5.16 0.916270404781198\\
55.2346267924782 -5.16 0.789535210227975\\
54.6458594113407 5.16 0.90665106580451\\
54.6458594113407 -5.16 0.766066950988247\\
54.0570695175187 5.16 0.8937769833122\\
54.0570695175187 -5.16 0.741992135094825\\
53.4682441491636 5.16 0.876357238083529\\
53.4682441491636 -5.16 0.717001059984187\\
52.8793740736682 5.16 0.853282257338918\\
52.8793740736682 -5.16 0.690830786141849\\
52.2904866944927 5.16 0.825224015736729\\
52.2904866944927 -5.16 0.663677774247094\\
51.7016302093474 5.16 0.793865675691223\\
51.7016302093474 -5.16 0.63599923574065\\
51.112853054614 5.16 0.760902005788897\\
51.112853054614 -5.16 0.608255374898384\\
50.5242036666743 5.16 0.728027774616247\\
50.5242036666743 -5.16 0.580906395996161\\
49.9357214188773 5.16 0.696845486217194\\
49.9357214188773 -5.16 0.554378091489725\\
49.34731980041 5.16 0.667676103997848\\
49.34731980041 -5.16 0.528618278822104\\
48.7588201396891 5.16 0.639902365535598\\
48.7588201396891 -5.16 0.503224846226765\\
48.1700416530365 5.16 0.61288550661184\\
48.1700416530365 -5.16 0.477787662432439\\
47.5808035567738 5.16 0.585986763007968\\
47.5808035567738 -5.16 0.45189659616786\\
46.9909455590082 5.16 0.558586750796152\\
46.9909455590082 -5.16 0.425166541245261\\
46.4007298896819 5.16 0.530465689880285\\
46.4007298896819 -5.16 0.397728385760678\\
45.8108158513444 5.16 0.501779335160029\\
45.8108158513444 -5.16 0.370197932857997\\
45.221878142327 5.16 0.472698002234357\\
45.221878142327 -5.16 0.343209787396737\\
44.6345914609611 5.16 0.443392006702236\\
44.6345914609611 -5.16 0.317398554236418\\
44.0495886187386 5.16 0.414029132438028\\
44.0495886187386 -5.16 0.293377135706701\\
43.466118610088 5.16 0.384693522636444\\
43.466118610088 -5.16 0.271041446854509\\
42.8817627126851 5.16 0.355368520345758\\
42.8817627126851 -5.16 0.249423320519435\\
42.2940029168829 5.16 0.326031467489245\\
42.2940029168829 -5.16 0.227503146507329\\
41.7003212130344 5.16 0.296659705990182\\
41.7003212130344 -5.16 0.204261314624044\\
41.0982731430351 5.16 0.267232024142359\\
41.0982731430351 -5.16 0.178696528172047\\
40.4898273413376 5.16 0.237813992470467\\
40.4898273413376 -5.16 0.150906300250734\\
39.8837927358578 5.16 0.208605693957086\\
39.8837927358578 -5.16 0.122691299144737\\
39.2895666668527 5.16 0.179818782548922\\
39.2895666668527 -5.16 0.0959987011116136\\
38.716546474579 5.16 0.151664912192673\\
38.716546474579 -5.16 0.0727756824089198\\
38.1740804821616 5.16 0.124355491324606\\
38.1740804821616 -5.16 0.0549593528098825\\
37.6648208803354 5.16 0.0980683896910431\\
37.6648208803354 -5.16 0.0431116597962725\\
37.1779817150201 5.16 0.0729141698606611\\
37.1779817150201 -5.16 0.0350348040376191\\
36.7011708387489 5.16 0.0489953495160949\\
36.7011708387489 -5.16 0.0282011276449008\\
36.2219961040549 5.16 0.026414446339982\\
36.2219961040549 -5.16 0.0200829727290969\\
35.7280732724464 5.16 0.00527359277326598\\
35.7280732724464 -5.16 0.00815469829562729\\
35.2110358647973 5.16 -0.0145207815225178\\
35.2110358647973 -5.16 -0.00908475427375977\\
34.6730600658283 5.16 -0.0335757740609423\\
34.6730600658283 -5.16 -0.03044792330668\\
34.1180303988879 5.16 -0.052581694560997\\
34.1180303988879 -5.16 -0.0543116979313642\\
33.5498313873248 5.16 -0.0722288527416733\\
33.5498313873248 -5.16 -0.0790529672760451\\
32.9723475095926 5.16 -0.0932075325147445\\
32.9723475095926 -5.16 -0.103048655517106\\
32.3889853831208 5.16 -0.115933325781693\\
32.3889853831208 -5.16 -0.125048739361974\\
31.8014940617455 5.16 -0.139868996211003\\
31.8014940617455 -5.16 -0.145097208342081\\
31.2112634403221 5.16 -0.164270849740765\\
31.2112634403221 -5.16 -0.163518437205726\\
30.6196834137057 5.16 -0.188395192309065\\
30.6196834137057 -5.16 -0.180636800701207\\
30.0281438767515 5.16 -0.211498329853994\\
30.0281438767515 -5.16 -0.196776673576825\\
29.4377809985028 5.16 -0.233004519635358\\
29.4377809985028 -5.16 -0.212185364379588\\
28.8485599716641 5.16 -0.253113135256614\\
28.8485599716641 -5.16 -0.226754511504272\\
28.2601084067474 5.16 -0.272247009554766\\
28.2601084067474 -5.16 -0.240273216764837\\
27.6720538825485 5.16 -0.290828996360733\\
27.6720538825485 -5.16 -0.252530572341968\\
27.0840239778637 5.16 -0.309281949505434\\
27.0840239778637 -5.16 -0.263315670416348\\
26.4956958330105 5.16 -0.327953872184169\\
26.4956958330105 -5.16 -0.272491177556375\\
25.9070524471417 5.16 -0.34673084214186\\
25.9070524471417 -5.16 -0.280373809676841\\
25.3181933807663 5.16 -0.365322899517437\\
25.3181933807663 -5.16 -0.287453318752528\\
24.7292184238449 5.16 -0.383439737919108\\
24.7292184238449 -5.16 -0.294219797380386\\
24.1402273663382 5.16 -0.400791050955083\\
24.1402273663382 -5.16 -0.301163338157362\\
23.5513106712596 5.16 -0.417090155613281\\
23.5513106712596 -5.16 -0.308688588212764\\
22.9624807681389 5.16 -0.432080683725219\\
22.9624807681389 -5.16 -0.316485319009246\\
22.3737112029735 5.16 -0.44552137279428\\
22.3737112029735 -5.16 -0.323887084527663\\
21.7849752371249 5.16 -0.457171070900622\\
21.7849752371249 -5.16 -0.330224831160139\\
21.1962461319546 5.16 -0.466788626124401\\
21.1962461319546 -5.16 -0.334829505298794\\
20.607498823058 5.16 -0.47415600863399\\
20.607498823058 -5.16 -0.337118862900207\\
20.0187277089964 5.16 -0.47932398287326\\
20.0187277089964 -5.16 -0.337519821107768\\
19.4299397450839 5.16 -0.482516728947697\\
19.4299397450839 -5.16 -0.337110368798292\\
18.8411420959137 5.16 -0.483961317223812\\
18.8411420959137 -5.16 -0.336979346044152\\
18.2523419260789 5.16 -0.483884818068118\\
18.2523419260789 -5.16 -0.338215592917721\\
17.6635461176669 5.16 -0.482508202759974\\
17.6635461176669 -5.16 -0.341810296135255\\
17.0747568075504 5.16 -0.479949996974207\\
17.0747568075504 -5.16 -0.347114371196972\\
16.485972195177 5.16 -0.476243720358448\\
16.485972195177 -5.16 -0.352117689952201\\
15.8971903608127 5.16 -0.471420319507932\\
15.8971903608127 -5.16 -0.354768926740659\\
15.3084093847231 5.16 -0.465510741017896\\
15.3084093847231 -5.16 -0.353016755902063\\
14.7196273909792 5.16 -0.458549584804613\\
14.7196273909792 -5.16 -0.344887472907207\\
14.1308436334309 5.16 -0.450665673587248\\
14.1308436334309 -5.16 -0.330409299818457\\
13.5420585681176 5.16 -0.442088091827533\\
13.5420585681176 -5.16 -0.31174069301942\\
12.9532727093831 5.16 -0.433050786557501\\
12.9532727093831 -5.16 -0.291143422619167\\
12.3644865715714 5.16 -0.423787704809184\\
12.3644865715714 -5.16 -0.270879258726766\\
11.7757006630187 5.16 -0.414523787259028\\
11.7757006630187 -5.16 -0.253178353180044\\
11.1869152299226 5.16 -0.405090984368217\\
11.1869152299226 -5.16 -0.238891201961684\\
10.5981301604204 5.16 -0.394784453732404\\
10.5981301604204 -5.16 -0.226983802684749\\
10.0093453168708 5.16 -0.382860706534687\\
10.0093453168708 -5.16 -0.216286478466366\\
9.42056056163238 5.16 -0.368576253958161\\
9.42056056163238 -5.16 -0.205629552423662\\
8.83177575773971 5.16 -0.351194060377347\\
8.83177575773971 -5.16 -0.193850001095043\\
8.24299082711088 5.16 -0.330539324469457\\
8.24299082711088 -5.16 -0.180364480347981\\
7.65420579540707 5.16 -0.307427809795068\\
7.65420579540707 -5.16 -0.165610946216501\\
7.06542069884972 5.16 -0.282776111030737\\
7.06542069884972 -5.16 -0.150131314442139\\
6.4766355736602 5.16 -0.257500822853019\\
6.4766355736602 -5.16 -0.13446750076643\\
5.88785045600988 5.16 -0.232517352265225\\
5.88785045600988 -5.16 -0.119160701400256\\
5.2990653700479 5.16 -0.208455897675182\\
5.2990653700479 -5.16 -0.104579324013857\\
4.71028031237311 5.16 -0.185293066057777\\
4.71028031237311 -5.16 -0.0906958095651698\\
4.12149527574123 5.16 -0.162914291908904\\
4.12149527574123 -5.16 -0.0774273637918704\\
3.53271025290799 5.16 -0.141205009724459\\
3.53271025290799 -5.16 -0.0646911924316356\\
2.94392523662908 5.16 -0.120050654000336\\
2.94392523662908 -5.16 -0.0524045012221414\\
2.35514021966025 5.16 -0.0993366592324308\\
2.35514021966025 -5.16 -0.0404844959010647\\
1.7663551947572 5.16 -0.0789484599166379\\
1.7663551947572 -5.16 -0.0288483822060813\\
1.17757015467567 5.16 -0.058771490548853\\
1.17757015467567 -5.16 -0.0174133658748683\\
0.588785092171356 5.16 -0.0386911856249704\\
0.588785092171356 -5.16 -0.00609665264510153\\
0 5.16 -0.018592979640886\\
0 -5.16 0.00518455174554207\\
};
\end{axis}
\end{tikzpicture}%
\end{document}

enter image description here This Fig. is created by Matlab, the axis range of which is what I what.

enter image description here And this Fig. is created by the above code, which does not display well.

share|improve this question
    
Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Jubobs Aug 7 '13 at 6:44

2 Answers 2

up vote 3 down vote accepted

No offense but both look pretty strange. But if you want to replicate the orientation and scales you can use <x,y,z> post scale key.

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
grid=major,
xmin=0,
xmax=124.6,
ymin=-5.16,
ymax=5.16,
zmin=-0.50849813416709,
zmax=1.00241500295172,
width=10cm,
height=5cm,
view={-50}{80},
x post scale=5,
y post scale=0.5,
enlarge z limits
]

\addplot3[surf,colormap/jet,shader=faceted interp,mesh/rows=215]
         table[row sep=crcr,header=false] {
....

};
\end{axis}
\end{tikzpicture}%
\end{document}

enter image description here

share|improve this answer

The length ratio between the axis can be set using the plot box ratio option, which is set to {1 1 1} by default. Changing this default ratio and specifying the width and height of the picture seems to confuse the rendering engint. My advice is to set only the height to control the size of the plot. The scale only axis seems not useful for this particular plot, as is used normally for 2d plots with two or more y axis.

The following axis definition

\begin{tikzpicture}[scale=0.75]
\begin{axis}[%                                                            
view={-45}{30},
plot box ratio={125 10 1.5}, % based on ranges of x, y and z data                 
% width=11in,
height=2in,
%... no additional changes
]
% ... no additional changes
\end{axis}
\end{tikzpicture}

gives this

img

On a side note, setting the scale option of the tikzpicture environment only changes the size of axis ticks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.