I need a plot with x axis from 1 to 6 and I used axis([1 6 0 10]). This gives me decimals on the axis like 1, 1.5, 2,2.5 and so on. I need only 1, 2, 3 and so on instead of the decimals .How can I get rid of the decimals on the x axis?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Janhavi Kulkarni
el 8 de Mayo de 2015
Respondida: Nobel Mondal
el 8 de Mayo de 2015
I need a plot with x axis from 1 to 6 and I used axis([1 6 0 10]). This gives me decimals on the axis like 1, 1.5, 2,2.5 and so on. I need only 1, 2, 3 and so on instead of the decimals .How can I get rid of the decimals on the x axis?
0 comentarios
Respuesta aceptada
Nobel Mondal
el 8 de Mayo de 2015
ax = gca; % Get the axis of your figure
ax.XTickLabel = 1:6;
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Grid Lines, Tick Values, and Labels 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!