No data manipulation required. Just the bid/ask sums at each point in time for each price. This provides the x, y, and z matrices it requires.
http://www.mathworks.com/help/matlab/ref/mesh.htmlIt would just be mesh(bid/ask sums, price, time)
If you have the matrices at least, which should be easy to get.
It's not a matrix though, it's a list of prices and amounts at each point in time. No reason something like Matlab couldn't handle something like that, as mature as it is but I don't know if it does. Overkill for something like this though.