MATLAB: Get title of subplot back buttonplotsubplottitle hey Guys, I have 9subplots in 1 figure and I want to give the User of my program the possibility to click of one subplot and get the title back…. do u have any tips ? Best Answer closex=repmat((1:10)',1,9);y=rand(10,9);for k=1:9 subplot(3,3,k); plot(x(:,k),y(:,k)); title(sprintf('title%d',k))end%------The code-----------------------h=flipud(findobj(gcf,'type','axes'))%-----get title N°5----------------n=5g=get(h(n),'title');title_5=get(g,'string') Related SolutionsMATLAB: SUBPLOT : UPPER & LOWER PLOT %truefor i = 1: 6 subplot(6,2,i) y = cos(i*x); plot(x,y) title(sprintf('y = cos(%dx)', i));end MATLAB: Beginner subplot graph problem doc plotyyYou can use this on a subplot:subplot(1,2,1);plotyy(1:10,1:10,1:10,100:-10:1) Related QuestionSubplots with multiple axesCreate Plot Title of the Plotted Function
Best Answer