I tried this code to get a categorical label on the bottom of my bar graph:
c = categorical({'apples','oranges','pears'});
prices = [1.23 0.99 2.3];
bar(c,prices)
In the MATLAB documentation, this claims to have the bottom of the axis labelled with the categories in c
. Instead I only see 1, 2, 3 along the bottom. Is something wrong with my setup?