In the plotting guide I didn't see a waterfall chart so I created a procedure. 
If anyone has a more efficent, better or alternate way please feel free to add.


 

waterfall := proc (data, colorinc := green, colordec := red) local i, r1; r || 1 := plots:-display(plottools:-rectangle([0, 0], [1, data[1]]), color = colorinc); for i from 2 to nops(data) do if data[i-1] < data[i] then r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]]), color = colorinc) elif data[i] < data[i-1] then r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]]), color = colordec) else r || i := plots:-display(plottools:-rectangle([i-1, data[i-1]], [i, data[i]])) end if end do; plots:-display(seq(r || i, i = 1 .. nops(data))) end proc
``

data := [6, 4, 4, 4, 7, 9, 12, 16, 25, 100, 105, 95, 90, 55, 45, 30]

[6, 4, 4, 4, 7, 9, 12, 16, 25, 100, 105, 95, 90, 55, 45, 30]

(1)

waterfall(data)

 

waterfall(data, purple, yellow)

 

``


 

Download Waterfall.mw

 


Please Wait...