waterfall

waterfall(x, options) plots a bar chart used to represent the cumulative effect of positive or negative values sequentially entered.

Single vector input

x = [1 2 -3 -4 5 6]
waterfall(x)

Labels defined

options = struct     

% initializing options struct

options.posWaterfallFill = '#3399ff' options.negWaterfallFill = '#ff8c1a' options.xAxisLabels = {'january','february','march','april','may','june'} options.barOpacity = 0.7 x = [1 2 -3 -4 5 6] waterfall(x,options)

See also

bar | histogram