How to plot two sets of differing variables under one figure?

1 view (last 30 days)
I have two sets of ECG variables;
X and Y as one set, X1 and Y1 as one set.
How do I plot them both in one Figure, with the first set of data above the second set of data?

Accepted Answer

Walter Roberson
Walter Roberson on 20 Oct 2015
offset = abs(max(x)) * 1.1;
plot(x, y, 'b', x1, y1+offset, 'k')
  2 Comments
SYARIFUDDIN BAGINDA ALI
SYARIFUDDIN BAGINDA ALI on 20 Oct 2015
thanks!
do you happen to know on how to do it separately but still within the same figure? for instance, set 1 in one box, set 2 in one box below set 1.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!