3D Barplot with height of the bars coded into the color. Might be used as a 2D Histogram.
- x and y are the centers of the bins
- Z is a matrix containing the heights of the bins
Johannes Schmitz (2020). plot_bar3_colorheights( x, y, Z ) (https://www.mathworks.com/matlabcentral/fileexchange/52067-plot_bar3_colorheights-x-y-z), MATLAB Central File Exchange. Retrieved .
That is nice work for 2 dimensional matrix but it fails to plot dimension > 2.
thank your for adding the example
You use it for example like this:
plot_bar3_colorheights([1 2],[1 2], [1 2; 1 3])
then you get a 2x2 plot.
You have to provide the x component for the centers of the bins and the y component. In this case you have a bins around [1,1] [1,2] [2,1] and [2,2] and the matrix with the heights is in this case obviously a 2x2 matrix.
Is that clear enough?
I couldn't get it to work so i can't really rate. There is no real help provided nor dimensions of inputs. At least one example would be nice...let's say the one that was used to generate the Figure.