2

I am using bar3 to plot 3d diagrams in Matlab but it seems that in LaTeX the plotting order is wrong ? Is there any way to have the right order?

enter image description here This is a small example of the generated 2.tikz file

\begin{tikzpicture}
\begin{axis}[%
width=\figurewidth,
height=\figureheight,
unbounded coords=jump,
view={-37.5}{30},
scale only axis,
xmin=0.6,
xmax=1.4,
xtick={\empty},
xmajorgrids,
y dir=reverse,
ymin=0,
ymax=10,
ytick={1, 2, 3, 4, 5, 6, 7, 8, 9},
ymajorgrids,
zmin=0,
zmax=1.8,
zmajorgrids,
axis x line*=bottom,
axis y line*=left,
axis z line*=left
]

\addplot3[%
surf,
shader=faceted,
draw=black,
colormap/jet,
point meta=explicit,
mesh/rows=4]
table[row sep=crcr,header=false,meta index=3] {
NaN NaN NaN 1\\
0.6 0.6 0 1\\
0.6 1.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 1.6 0 1\\
0.6 2.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 2.6 0 1\\
0.6 3.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 3.6 0 1\\
0.6 4.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 4.6 0 1\\
0.6 5.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 5.6 0 1\\
0.6 6.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 6.6 0 1\\
0.6 7.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 7.6 0 1\\
0.6 8.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 8.6 0 1\\
0.6 9.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
0.6 0.6 0 1\\
0.6 0.6 0.453486380396396 1\\
0.6 1.4 0.453486380396396 1\\
0.6 1.4 0 1\\
0.6 0.6 0 1\\
NaN NaN NaN 1\\
0.6 1.6 0 1\\
0.6 1.6 0.500551426394066 1\\
0.6 2.4 0.500551426394066 1\\
0.6 2.4 0 1\\
0.6 1.6 0 1\\
NaN NaN NaN 1\\
0.6 2.6 0 1\\
0.6 2.6 0.530653947397964 1\\
0.6 3.4 0.530653947397964 1\\
0.6 3.4 0 1\\
0.6 2.6 0 1\\
NaN NaN NaN 1\\
0.6 3.6 0 1\\
0.6 3.6 0.687568213750107 1\\
0.6 4.4 0.687568213750107 1\\
0.6 4.4 0 1\\
0.6 3.6 0 1\\
NaN NaN NaN 1\\
0.6 4.6 0 1\\
0.6 4.6 0.820537888833387 1\\
0.6 5.4 0.820537888833387 1\\
0.6 5.4 0 1\\
0.6 4.6 0 1\\
NaN NaN NaN 1\\
0.6 5.6 0 1\\
0.6 5.6 1.07871476415846 1\\
0.6 6.4 1.07871476415846 1\\
0.6 6.4 0 1\\
0.6 5.6 0 1\\
NaN NaN NaN 1\\
0.6 6.6 0 1\\
0.6 6.6 1.44792272826121 1\\
0.6 7.4 1.44792272826121 1\\
0.6 7.4 0 1\\
0.6 6.6 0 1\\
NaN NaN NaN 1\\
0.6 7.6 0 1\\
0.6 7.6 1.52540976235072 1\\
0.6 8.4 1.52540976235072 1\\
0.6 8.4 0 1\\
0.6 7.6 0 1\\
NaN NaN NaN 1\\
0.6 8.6 0 1\\
0.6 8.6 1.60554036231844 1\\
0.6 9.4 1.60554036231844 1\\
0.6 9.4 0 1\\
0.6 8.6 0 1\\
NaN NaN NaN 1\\
1.4 0.6 0 1\\
1.4 0.6 0.453486380396396 1\\
1.4 1.4 0.453486380396396 1\\
1.4 1.4 0 1\\
1.4 0.6 0 1\\
NaN NaN NaN 1\\
1.4 1.6 0 1\\
1.4 1.6 0.500551426394066 1\\
1.4 2.4 0.500551426394066 1\\
1.4 2.4 0 1\\
1.4 1.6 0 1\\
NaN NaN NaN 1\\
1.4 2.6 0 1\\
1.4 2.6 0.530653947397964 1\\
1.4 3.4 0.530653947397964 1\\
1.4 3.4 0 1\\
1.4 2.6 0 1\\
NaN NaN NaN 1\\
1.4 3.6 0 1\\
1.4 3.6 0.687568213750107 1\\
1.4 4.4 0.687568213750107 1\\
1.4 4.4 0 1\\
1.4 3.6 0 1\\
NaN NaN NaN 1\\
1.4 4.6 0 1\\
1.4 4.6 0.820537888833387 1\\
1.4 5.4 0.820537888833387 1\\
1.4 5.4 0 1\\
1.4 4.6 0 1\\
NaN NaN NaN 1\\
1.4 5.6 0 1\\
1.4 5.6 1.07871476415846 1\\
1.4 6.4 1.07871476415846 1\\
1.4 6.4 0 1\\
1.4 5.6 0 1\\
NaN NaN NaN 1\\
1.4 6.6 0 1\\
1.4 6.6 1.44792272826121 1\\
1.4 7.4 1.44792272826121 1\\
1.4 7.4 0 1\\
1.4 6.6 0 1\\
NaN NaN NaN 1\\
1.4 7.6 0 1\\
1.4 7.6 1.52540976235072 1\\
1.4 8.4 1.52540976235072 1\\
1.4 8.4 0 1\\
1.4 7.6 0 1\\
NaN NaN NaN 1\\
1.4 8.6 0 1\\
1.4 8.6 1.60554036231844 1\\
1.4 9.4 1.60554036231844 1\\
1.4 9.4 0 1\\
1.4 8.6 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 0.6 0 1\\
1.4 1.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 1.6 0 1\\
1.4 2.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 2.6 0 1\\
1.4 3.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 3.6 0 1\\
1.4 4.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 4.6 0 1\\
1.4 5.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 5.6 0 1\\
1.4 6.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 6.6 0 1\\
1.4 7.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 7.6 0 1\\
1.4 8.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
1.4 8.6 0 1\\
1.4 9.4 0 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
NaN NaN NaN 1\\
};
\end{axis}
\end{tikzpicture}%

This is the Matlab code to plot the 3d bar

a1=[0.01 0.05 0.1 0.5 1 5 100 500 1000] ;
L1= reshape(a1,[3,3]) ;
b1=[1e-3 1e-3 1e-3 1e-3 1e-3 1e-3 1e-3 1e-3 1e-3] ;
L2= reshape(b1,[3,3]) ;
c1=[0.4535 0.5006 0.5307 0.6876 0.825 1.0787 1.4479 1.5254 1.6055] ;
r1= reshape(c1,[3,3]) ;
bar3(c1) ;
set(gca(gcf), 'xticklabel',{'1e-2', '5e-2' ,'1e-1', '5e-1', '1' ,'5' ,'100', '500' ,'1000'},'yticklabel',{'1e-3', '1e-3' ,'1e-3', '1e-3', '1e-3', '1e-3' ,'1e-3' ,'1e-3' ,'1e-3'});
xlabel('lambda1') ; ylabel ('lambda2'); zlabel('rmse abundance') ;

This is my LaTeX code

\begin{figure}[ht] 
\centering
\centering 
\setlength\figureheight{3cm}
\setlength\figurewidth{3cm}
\pgfplotsset{ tick label style={color=white}}
\input{bilder/2.tikz} 
\caption{versuch} \label{fig:versuch}
\end{figure} 

This is the plot result with all data enter image description here

13
  • 1
    Can you make a small example from the contents of 2.tikz file? Please don't just paste it. Take your time to make sure that the problem persists even with a smaller even manually typed data. And apart from the problem at hand do you really need bar plot for this? 3D bar plots are very bad at displaying data as you can directly see here.
    – percusse
    Aug 14 '15 at 16:24
  • thank you for your help . I have added the code in the question
    – Anna
    Aug 14 '15 at 17:09
  • The code you posted you posted is incomplete. A suggestion: make a plot in Matlab that uses only a few of the data points, but enough of them that the problem is evident. Then add the complete contents of the .tikz file generated by matlab2tikz to your question. Aug 14 '15 at 17:11
  • Could you post a working mini example (please include the tikzpicture part). At least, I can't compile your code, ie I get the error message Package pgfplots Error: the arguments of [mesh/rows=4,mesh/cols=3] assume 12 ete or overcomplete!? [Use mesh/check=false to disable this message]. \end{axis} and fixing the number of rows produces a different resulte than both of you picutres.
    – jlk
    Aug 14 '15 at 18:02
  • You could also try mathworks.com/matlabcentral/fileexchange/23629-exportfig
    – jlk
    Aug 14 '15 at 18:14
1

I used the last version of matlab2tikz (v1.0.0.) and the results matched the matlab plot. Are you using the latest version of the package? enter image description here

\documentclass{article}
    \usepackage{pgfplots}
\usepackage{tikz}
\usepackage{tikz-3dplot}

\begin{document}

\begin{figure}
    \centering
    \newlength\figureheight 
    \newlength\figurewidth 
    \setlength\figureheight{6cm} 
    \setlength\figurewidth{6cm}
    \begin{tikzpicture}

    \begin{axis}[%
    width=0.527\figurewidth,
    height=\figureheight,
    at={(0\figurewidth,0\figureheight)},
    scale only axis,
    plot box ratio=1 12.5 7.725,
    point meta min=1,
    point meta max=2,
    unbounded coords=jump,
    xmin=0.6,
    xmax=1.4,
    xtick={\empty},
    tick align=outside,
    xlabel={lambda1},
    xmajorgrids,
    y dir=reverse,
    ymin=0,
    ymax=10,
    ytick={1,2,3,4,5,6,7,8,9},
    yticklabels={{1e-3},{1e-3},{1e-3},{1e-3},{1e-3},{1e-3},{1e-3},{1e-3},{1e-3}},
    ylabel={lambda2},
    ymajorgrids,
    zmin=0,
    zmax=2,
    zlabel={rmse abundance},
    zmajorgrids,
    view={-37.5}{30},
    axis background/.style={fill=white},
    axis x line*=bottom,
    axis y line*=left,
    axis z line*=left
    ]

    \addplot3[%
    surf,
    shader=flat corner,draw=white!15!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=4]
    table[row sep=crcr, point meta=\thisrow{c}] {%
        %
        x   y   z   c\\
        nan nan nan 1\\
        0.6 0.6 0   1\\
        0.6 1.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 1.6 0   1\\
        0.6 2.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 2.6 0   1\\
        0.6 3.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 3.6 0   1\\
        0.6 4.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 4.6 0   1\\
        0.6 5.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 5.6 0   1\\
        0.6 6.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 6.6 0   1\\
        0.6 7.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 7.6 0   1\\
        0.6 8.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 8.6 0   1\\
        0.6 9.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        0.6 0.6 0   1\\
        0.6 0.6 0.4535  1\\
        0.6 1.4 0.4535  1\\
        0.6 1.4 0   1\\
        0.6 0.6 0   1\\
        nan nan nan 1\\
        0.6 1.6 0   1\\
        0.6 1.6 0.5006  1\\
        0.6 2.4 0.5006  1\\
        0.6 2.4 0   1\\
        0.6 1.6 0   1\\
        nan nan nan 1\\
        0.6 2.6 0   1\\
        0.6 2.6 0.5307  1\\
        0.6 3.4 0.5307  1\\
        0.6 3.4 0   1\\
        0.6 2.6 0   1\\
        nan nan nan 1\\
        0.6 3.6 0   1\\
        0.6 3.6 0.6876  1\\
        0.6 4.4 0.6876  1\\
        0.6 4.4 0   1\\
        0.6 3.6 0   1\\
        nan nan nan 1\\
        0.6 4.6 0   1\\
        0.6 4.6 0.825   1\\
        0.6 5.4 0.825   1\\
        0.6 5.4 0   1\\
        0.6 4.6 0   1\\
        nan nan nan 1\\
        0.6 5.6 0   1\\
        0.6 5.6 1.0787  1\\
        0.6 6.4 1.0787  1\\
        0.6 6.4 0   1\\
        0.6 5.6 0   1\\
        nan nan nan 1\\
        0.6 6.6 0   1\\
        0.6 6.6 1.4479  1\\
        0.6 7.4 1.4479  1\\
        0.6 7.4 0   1\\
        0.6 6.6 0   1\\
        nan nan nan 1\\
        0.6 7.6 0   1\\
        0.6 7.6 1.5254  1\\
        0.6 8.4 1.5254  1\\
        0.6 8.4 0   1\\
        0.6 7.6 0   1\\
        nan nan nan 1\\
        0.6 8.6 0   1\\
        0.6 8.6 1.6055  1\\
        0.6 9.4 1.6055  1\\
        0.6 9.4 0   1\\
        0.6 8.6 0   1\\
        nan nan nan 1\\
        1.4 0.6 0   1\\
        1.4 0.6 0.4535  1\\
        1.4 1.4 0.4535  1\\
        1.4 1.4 0   1\\
        1.4 0.6 0   1\\
        nan nan nan 1\\
        1.4 1.6 0   1\\
        1.4 1.6 0.5006  1\\
        1.4 2.4 0.5006  1\\
        1.4 2.4 0   1\\
        1.4 1.6 0   1\\
        nan nan nan 1\\
        1.4 2.6 0   1\\
        1.4 2.6 0.5307  1\\
        1.4 3.4 0.5307  1\\
        1.4 3.4 0   1\\
        1.4 2.6 0   1\\
        nan nan nan 1\\
        1.4 3.6 0   1\\
        1.4 3.6 0.6876  1\\
        1.4 4.4 0.6876  1\\
        1.4 4.4 0   1\\
        1.4 3.6 0   1\\
        nan nan nan 1\\
        1.4 4.6 0   1\\
        1.4 4.6 0.825   1\\
        1.4 5.4 0.825   1\\
        1.4 5.4 0   1\\
        1.4 4.6 0   1\\
        nan nan nan 1\\
        1.4 5.6 0   1\\
        1.4 5.6 1.0787  1\\
        1.4 6.4 1.0787  1\\
        1.4 6.4 0   1\\
        1.4 5.6 0   1\\
        nan nan nan 1\\
        1.4 6.6 0   1\\
        1.4 6.6 1.4479  1\\
        1.4 7.4 1.4479  1\\
        1.4 7.4 0   1\\
        1.4 6.6 0   1\\
        nan nan nan 1\\
        1.4 7.6 0   1\\
        1.4 7.6 1.5254  1\\
        1.4 8.4 1.5254  1\\
        1.4 8.4 0   1\\
        1.4 7.6 0   1\\
        nan nan nan 1\\
        1.4 8.6 0   1\\
        1.4 8.6 1.6055  1\\
        1.4 9.4 1.6055  1\\
        1.4 9.4 0   1\\
        1.4 8.6 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 0.6 0   1\\
        1.4 1.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 1.6 0   1\\
        1.4 2.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 2.6 0   1\\
        1.4 3.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 3.6 0   1\\
        1.4 4.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 4.6 0   1\\
        1.4 5.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 5.6 0   1\\
        1.4 6.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 6.6 0   1\\
        1.4 7.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 7.6 0   1\\
        1.4 8.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
        1.4 8.6 0   1\\
        1.4 9.4 0   1\\
        nan nan nan 1\\
        nan nan nan 1\\
        nan nan nan 1\\
    };
    \end{axis}
    \end{tikzpicture}
    \caption{A plot of a sphere}
    \label{fig:sphere}
\end{figure}


\end{document}

Have a look at:

\begin{tikzpicture}
\begin{axis}[%
...
plot box ratio=1 12.5 7.725,
unbounded coords=jump,
        ]

        \addplot3[%
        surf,
        shader=flat 
        corner,draw=white!15!black,
        z buffer=sort,
        colormap/jet,
        mesh/rows=4]
        table[row sep=crcr, point meta=\thisrow{c}] {%
            %
            x   y   z   c\\
...
3
  • Thank you for the answer . Yes I am using the last version . With the small example it works and I became good results in Latex . But when I try to plot the hole picture the tikz plot and the matlab plot don't match .
    – Anna
    Aug 15 '15 at 13:58
  • I will add the latex plot in the question . Thank you for the help
    – Anna
    Aug 15 '15 at 14:00
  • I think the problem was the plotting order . He tries to plot the first values and he does it correctly then he plots the second values on the first and the third on the second etc . Is there any function that we can use to avoid changing the plotting order ? thanks
    – Anna
    Aug 15 '15 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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