Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can I select an axes to put labels on top of each bar in bar graph with other bar graphs on other axes in GUI ?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello,
In GUI, I created 3 axes next to each other. on each axes I want to have a bar graph and to put the label of each bar on top. My problem is that I can't select on which axes I want each labels.
if true
%%Median Topspeed Sector
bar(handles.axes12,z(1:length(speed1med)),speed1med,'FaceColor','m','EdgeColor','white','LineWidth',5)
text(z(1:length(speed1med)),speed1med,num2str(speed1med(:,1)),'horizontalalignment','center')
set(handles.axes12,'xtick',0:1:21);
set(handles.axes12,'ytick',0:1:350);
ylim(handles.axes12,[minspeed1med-3 Maxspeed1med+2])
xlim(handles.axes12,[0 22])
ylabel (handles.axes12,'TopSpeed Median Sector 1')
%%Median Topspeed Sector 2
bar(handles.axes13,z(1:length(speed1med)),speed2med,'FaceColor','c','EdgeColor','white','LineWidth',5)
text(z(1:length(speed1med)),speed2med,num2str(speed2med(:,1)),'horizontalalignment','center')
set(handles.axes13,'xtick',0:1:21);
set(handles.axes13,'ytick',0:1:350);
ylim(handles.axes13,[minspeed2med-3 Maxspeed2med+2])
xlim(handles.axes13,[0 22])
ylabel (handles.axes13,'TopSpeed Median Sector 2')
%%Median Topspeed Sector 3
bar(handles.axes14,z(1:length(speed1med)),speed3med,'FaceColor','b','EdgeColor','white','LineWidth',5)
text(z(1:length(speed1med)),speed3med,num2str(speed3med(:,1)),'horizontalalignment','center')
set(handles.axes14,'xtick',0:1:21);
set(handles.axes14,'ytick',0:1:350);
ylim(handles.axes14,[minspeed3med-3 Maxspeed3med+2])
xlim(handles.axes14,[0 22])
xlabel(handles.axes14,'Driver #')
ylabel (handles.axes14,'TopSpeed Median Sector 3')
end
I tried:
if true
text(handles.axes12,z(1:length(speed1med)),speed1med,num2str(speed1med(:,1)),'horizontalalignment','center')
end
but I have an error.
Do you have an idea to solve this problem ?
Thank you,
Martin
댓글 수: 1
Adam
2018년 5월 18일
If you have an error please post what it is else how can you expect help with it?!
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!