Looking for a version of the waterfall site in Matlab

I have 3-dimensional data to be built in Matlab. The data set is constructed by adding 10 exponential curves with various parameters along the y-directions, such as

x = 0:0.01:15; x0 = 0.5; y = [beta1, beta2, beta3, beta4, beta5, beta6, beta7, beta8, beta9, beta10]; Z(1, :) = A*exp(-(x-x0).^2/beta1); Z(2, :) = A*exp(-(x-x0).^2/beta2); Z(3, :) = A*exp(-(x-x0).^2/beta3); Z(4, :) = A*exp(-(x-x0).^2/beta4); ... Z(10, :) = A*exp(-(x-x0).^2/beta10); % here A could be change based on beta too (no code shown here) 

I am trying to build a Z with a waterfall, except that I do not want the height (i.e. the vertical line) to appear on the edge. I do not know if there is any other way to construct the data in the form of waterfall curves, but without these vertical lines. Thanks

how to get rid the vertical lines as circled in the following figures

+4
source share
2 answers

"it is built with lines instead of a patch with a surface."
In other words, you want the boundary lines to be invisible. It’s good that there’s no trivial feat, because the boundary lines are separated from any color scheme that you can directly include. What you need to do is get the data after creating it, and then change it accordingly:

eg.

 [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,:) for the upstream border, and CD(end-2:end-1,:) for the falling border, and CD(end,:) for the bottom.

+2
source

I know this is an old post, but below make the area under the curve transparent:

 figure; [X,Y,Z] = peaks(10); handle_figure = waterfall( X, Y, Z ); set( handle_figure, 'FaceColor', 'none' ); 
+1
source

Source: https://habr.com/ru/post/1411034/


All Articles