how do i set the positions of checkbox near each plot in my Figure ?
2 次查看(过去 30 天)
显示 更早的评论
I have a subplot of two figures and i want to put two checkboxes near to each figure and a push button in the middle of the two plots .Currently i have the checkboxes and the push button but i am not able to position this near the plots .
I have formed the code and can you please tell me what exactly to add so that i can get the required result .
Thank you
I am attaching a part of my code to this question and also the plot .
I have got the position of the two plots but not getting the result.
Thank you in adavance
function [M] = checkbox_Plot(Annot,value,idx_1,no_fig)
M = zeros(1,5);
%length_Annot = length(Annot);
for l = 1:length(idx_1)
%vec_ToPlot = value(l,:);
d = figure(no_fig);
sgtitle(Annot);
subplot(numel(idx_1),1,l);
%sgtitle(name);
ax(l) = gca;
pa = get(ax(l),'Position'); % position of subplot axes
plot(value(l,:));
set(ax(l),'XtickLabel',{},'YtickLabel',{},....
'Xtick',[],'Ytick',[],'TickLength',[0 0])
h(l) = uicontrol('Style','checkbox',....
'Position',[100 100 84 22],....
'String',['Press_' num2str(l)],....
'Callback' , @box_value);
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!