How can I change the spacing/number of ticks in a figure?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Carlo Vignali
el 30 de En. de 2019
Comentada: Carlo Vignali
el 31 de En. de 2019
This is basically what I want my graph to look like, but I can't get the yticks to align with the center of each bar so that they can be labeled properly. I've looked at previous posts and havent been able to find a solution.![Screen Shot 2019-01-30 at 4.48.07 PM.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202164/Screen%20Shot%202019-01-30%20at%204.48.07%20PM.png)
![Screen Shot 2019-01-30 at 4.48.07 PM.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202164/Screen%20Shot%202019-01-30%20at%204.48.07%20PM.png)
graphValues=rand(24,1);
barh(graphValues)
0 comentarios
Respuesta aceptada
Ollie A
el 30 de En. de 2019
This link should help:
It says you can specify the ticks on the y-axis. In your case it would be done as follows:
yticks([1:24])
Hope that helps!
Más respuestas (0)
Ver también
Categorías
Más información sobre Labels and Annotations 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!