This is regarding the legend part of your question:
In order to have a single legend entry for several, separately-plotted items (the more accurate term would be "children of the axes object"), you should use hggroup. This way, plotted objects (such as lines) are grouped together (technically they become children of the hggroup instead of being children of the axes directly) thus allowing you to apply certain settings to the entire group simultaneously.
Here's a simple example of how this works:
%// Without hggroup
figure(1337); hold all;
x = linspace(-pi/2,pi/2,200);
for ind=1:3
plot(x,sin(ind*x+ind),'DisplayName',...
['sin(' num2str(ind) 'x+' num2str(ind) ')']);
end
legend('-DynamicLegend','Location','NorthWest');
Results in:

Whereas:
%// With hggroup
figure(1338); hold all;
x = linspace(-pi/2,pi/2,200);
prePlot=length(get(gca,'Children'));
for ind=1:3
plot(x,sin(ind*x+ind),'DisplayName',...
['sin(' num2str(ind) 'x+' num2str(ind) ')']);
end
postPlot=length(get(gca,'Children'));
meshGrp = LegendGroupLatest(gca,postPlot-prePlot);
set(meshGrp,'DisplayName','Some sines');
legend('-DynamicLegend','Location','NorthWest');
Where LegendGroupLatest is:
function grpName=LegendGroupLatest(ax_handle,howMany)
grpName=hggroup;
tmp=get(ax_handle,'Children'); set(tmp(2:howMany+1),'Parent',grpName);
set(get(get(grpName,'Annotation'),...
'LegendInformation'),'IconDisplayStyle','on');
Results in:

In this example, all lines that were plotted inside the loop get added to a single hggroup without affecting previously drawn items, and you can obviously add different logic to assign plots to groups.
Notice that a dynamic legend usually adds any line that is present in the chart (if you draw a zoom box in an axes that has a dynamic legend - the zoom box borders temporarily get added to the legend!), but hggroup prevents that.
x-axis to ben*m, then you can't have a vertical gap as this would introduce more points on thexaxis. However, you can do this but you would have to eliminate some of the points for each of your signals to make room for the vertical gap, and you can certainly make the last point on thexaxisn*m. If eliminating points on each signal isn't an option, then you will the finalxpoint may have to be something liken*m + 20where we have 20 points to allow for all of the gaps in between the plots. Is this something that could work? - rayryengx(1:10)thenx(11:20)is the same asx(1:20). If you want to have a vertical gap and still keep the amount of points to be 20, you have to remove some of the points. For example, if you want to have a 2 element gap between the two signals, you could dox(1:9), thenx(12:20)- rayryeng