LABELLING PLOTS IN MATLAB

4 visualizaciones (últimos 30 días)
yiga benjamin
yiga benjamin el 13 de Nov. de 2020
Respondida: Ameer Hamza el 13 de Nov. de 2020
I want to label my x-axis plot as three months June, July and August. I am plotting datasets against months , how do i label the x-axis

Respuestas (1)

Ameer Hamza
Ameer Hamza el 13 de Nov. de 2020
If you have numeric values on x and y axis, you can set the xticklabels
x = linspace(1, 3);
y = rand(size(x));
plot(x, y);
xticks([1 2 3])
xticklabels({'June', 'July', 'August'})

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by