Looking for a variation of waterfall plot in matlab

后端 未结 2 456
故里飘歌
故里飘歌 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.

    0 讨论(0)
  • 2021-01-14 00:48

    i know this is an old post, but the below will make the region under the curve transparent:

    figure;
    [X,Y,Z] = peaks(10);
    handle_figure = waterfall( X, Y, Z );
    set( handle_figure, 'FaceColor', 'none' );
    
    0 讨论(0)
提交回复
热议问题