Borrar filtros
Borrar filtros

Labeling x-axis in bar function in a figure

1 visualización (últimos 30 días)
Lily
Lily el 1 de Oct. de 2012
Hi
Is it possible to label the xabel on figure 1 with words (see code below) i.e. 1 would be come 'mean' and 2 would be come 'std'?
m = [0.4 0.6 0.2]; %mean
s = [0.15 0.04 0.12]; %standard deviation
yhat = [m ; s];
yhat = [mvelocity ; svelocity];
figure(1)
bar(yhat);
hold on
colormap summer % Change the color scheme
hleg = legend('F1','F2','F1+F2');
set(hleg,'Location','NorthWest')
set(hleg,'Interpreter','none')
ylabel('Velocity [m/s]')
hold off

Respuesta aceptada

Wayne King
Wayne King el 1 de Oct. de 2012
Yes, just
set(gca,'xticklabel',{'mean','std'})

Más respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by