Looking for a variation of waterfall plot in matlab

后端 未结 2 480
故里飘歌
故里飘歌 2021-01-14 00:08

I have a 3-dimensional data to be plotted in matlab. The data set are built by stacking 10 exponential curves with different parameters along y directions such as



        
2条回答
  •  心在旅途
    2021-01-14 00:44

    "it is plotted with lines instead of patch with surface".
    In other words, you want the boundary lines to be invisible. Well that's no trivial feat as the boundary lines are separate from any color scheme you can directly include. What you need to do is get the data after it drawn then modify it accordingly:

    e.g.

    [X,Y,Z] = peaks(30);
    h = waterfall (X,Y,Z);
    CD = get (h, 'CData');
    CD(1,:) = nan;
    CD(end-2:end,:) = nan;
    set (h, 'CData', CD)
    

    note that CD(1,:) is for the "rising" boundary, while CD(end-2:end-1,:) is for the falling boundary, and CD(end,:) is for the bottom.

提交回复
热议问题