Changing number of buttons
2 views (last 30 days)
Show older comments
I've implemented a Gui with Guide where i can choose a mat-File. Then the data is shown in an image-plot with a variable number of xTickLabels and yTickLabels. Now i want this TickLabels as buttons or a button next to every TickLabel. Is it possible to create the buttons when the data is loading? And how could i place the buttons beside or under the TickLabels? I hope my problem is clear and I'm happy about every answer
0 Comments
Accepted Answer
Paulo Silva
on 20 Jul 2011
Something similar to this
figure
for n=1:9
b{n}=uicontrol('Style','PushButton','Units','Normalized',...
'String',['P' num2str(n)],'Position',[.1*n .1 .1 .1],...
'Callback',@(obj,event)msgbox(num2str(n),num2str(n)));
end
0 Comments
More Answers (0)
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!