I have multiple subplots in a figure. I want to be able to click on a subplot and know which subplot I am clicking on. Then I want to access the handle to that axis and the one adjacent to it.
For example:
I have a 3×2 matrix of subplots. When I click on any subplot, I want the whole row to have the axes turn green.
for i=1:6 subplot(3,2,i) plot(1:i*3) legend(num2str(i))end
Best Answer