How to have a common label for all x and y axes in case of subplots?
问题 I have used the following loop to get subplots: for j=1:19; Aj=B(j,:); subplot(5,4,j); plot(Aj,h) end For all these subplots, I need to have only one x-label and one y-label. How to do this? Also how to insert legend to all the subplots? 回答1: You can use suplabel from the FileExchange to have combined x and y label for all subplots. Example: subplot(1,2,1); plot(randperm(40)); hold on; plot(randperm(40)); %Plotting some random data legend('show') %To show the legend subplot(1,2,2); plot