"Ulf Graewe" wrote in message <email@example.com>... > "Phil Roberts" wrote in message <firstname.lastname@example.org>... > > Hello, > > > > I have 2 datasets which I would like plot on the same graphs. > > > > My code is below: > > for j = 1:2; > > for i = 1:7; > > for k = 1:5; > > figure;plot(x_data(i,j,k), y_data(i,j,k)); > > end > > end > > end > > Maybe you try this: > for j = 1:2; > figcounter=1; > for i = 1:7; > for k = 1:5; > figure(figcounter);plot(x_data(i,j,k), y_data(i,j,k)); > figcounter = figcounter + 1; > end > end > end > > I hope this is what you are looking for. > > Best, ulf
This works great when I add "hold on" on the end of the plot section of the script. Many thanks for your help.
On another note, when I am plotting multiple datasets and over laying the figures, is it possible to change the linestyle for each dataset and also add a legend for each dataset added to each figure?