A Problem with bar3 Function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
David Sanchez
am 11 Okt. 2013
It seems your Y-axis already shows those values. Could you please paste the code?
Antworten (1)
A Jenkins
am 11 Okt. 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 Kommentar
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!