Reputation: 495
I would like to plot a bar chart like below in MATLAB. Any one know which function should I use? Many thanks in advance!
Upvotes: 0
Views: 315
Reputation: 335
why don't you try to do it with the plot
or semilogx
function?
x = [0.1 0.18 0.18 0.32 0.32 0.56 0.56 1.0];
y = [30 30 25 25 110 110 80 80];
semilogx(x,y);
and if you want the x ticks like in your figure you can set them on the axis object:
ax = gca;
ax.XTick = unique(x);
ax.XTickLabel = unique(x);
Upvotes: 2