Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
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 ?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Adam
le 18 Mai 2018
If you have an error please post what it is else how can you expect help with it?!
Réponses (1)
Cette question est clôturée.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!