MATLAB: How to display stacked, logarithmic bar plots in MATLAB

bardwhhgwaitloglogarithmicMATLABplotstacked

I am trying to create stacked bar plots using a logarithmic scale. However, the following line of code returns a cell array:
vert=get(hb,'vertices');
This will cause an error on the next line:
vert(vert==0) = bv;

Best Answer

Each set of "stacked" bars is a single patch object, and the variable returned from BAR will be a vector of handles for those objects. The variable "vert" contains a cell array because each cell contains the vertices for the corresponding patch object. It is necessary to change the properties for each patch object.
for n = 1:numel(hb),
vert=get(hb(n),'vertices');
vert(vert==0) = bv;
set(hb(n),'vertices',vert);
end