It worked, but not when I was using ticks which I had set. The plot I was trying has 21 points, but I only wanted to label every third point [125, 250 500 1000 2000 4000 8000]. The labels that I had used earlier were used, but the other ticks were also labeled
125, 2 3 250 5 6 500 8 9 and so on. So a work around will need to be found. Thank you for the posting.
The few lines of code above by 'us' do a good quick job for color varying with bar height, but the entire bar does not color in like the function bar3color will.
Is there a way to create a stacked bar using the same colors used in a bar3color of a given data set? For example, if I use:
hh = bar3color(peaks(3));
I get a 3x3 plot whose bars are colored as a function of their height. I'd like to keep these same colors, for the same data, and stack the rows (or columns) so that the new stacked bar plot shows the total height, but each bar contributing to its total has the color used in the previous bar3color plot.
I want to do this so I can condense a bunch of information that I have on a bar3color plot into two dimensions and keep the coloring scheme so the eye can move easily between the same data on two different plots.