A Problem with bar3 Function
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I used bar3 function to generate the following figure, but I do not know how to set Y label correctly in my code. In each grid, Y label should be 0.3,0.4,0.5,0.6,0.7,0.8. The code that I use is in the commitment below. I would appreciate if you could help me. Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150565/image.jpeg)
2 comentarios
David Sanchez
el 11 de Oct. de 2013
It seems your Y-axis already shows those values. Could you please paste the code?
Respuestas (1)
A Jenkins
el 11 de Oct. de 2013
Are you trying to make 3 independent graphs on the same figure?
Are you familiar with subplot()? That would give you more control over the separate axes.
subplot(1,3,1)
bar3(y,ones(size(y)))
view(-70,30)
ylabel('grid 1')
subplot(1,3,2)
bar3(y,1:1:6)
view(-70,30)
ylabel('grid 2')
subplot(1,3,3)
bar3(y,6:-1:1)
view(-70,30)
ylabel('grid 3')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172197/image.bmp)
1 comentario
Ver también
Categorías
Más información sobre Subplots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!