# What is the best method to combine multiple vectored results into one chart?

Currently I am working on my research report where I've done a lot of measurements. For now I have uploaded everything into Matlab and visualise each on chart. Each one consists of 4 lines drawn with different color. As you may see in the picture below they are quite similar to each other:

This is just a part of my measurements and I can't add all off them into my work. Moreover the whole bunch of them don't show explicitly the similarity between them. What I want to achieve is to have one chart that is somehow the average of all of them.

The problem that I see now is different number of samples in each chart (x-axis) and different scale (y-axis). So I would be grateful for the advice how to cope with this. I can't do simple mean of all of the results because of those two problems. What would be the best method to display all the results as a one chart?

EDIT: I totally forget to explain what are the values. All colors beside black represent readings from different axis of accelerometer. So red is X, blue is Y and green i Z. The black one is vector sum of all 3 axis.

Once again, to clarify I want to have all such readings on all chart. So I will have all of those charts combined and displayed as only one chart, where there will be 4 colors still. I expect to have some of readings flatten, some smoothed and so on.

• It would be useful to know what these computational results represent, and what is the message that you are trying to convey with them. Typically one does not put graphs to tell "look at how many results I have!", but they want to convey a specific result such as "the blue method is cheaper than the others on average, although with higher variance". The first thing that you should have clear (and tell us if you want advice) is what your message is. – Federico Poloni Nov 22 '14 at 19:05
• @FedericoPoloni I totaly forget about adding legend to charts. I fixed explanation. – sebap123 Nov 23 '14 at 11:12
• I still don't see an explanation of what the message that you want to convey is. If you just want the reader to have an idea of what your readings look like, just put six data sets as you did here. – Federico Poloni Nov 23 '14 at 11:18
• As I mentioned in the message I have a lot of those measurements and I can put only one chart. An example, maybe easier to understand - you have two temperature measuring stations. Each one reads more or less this same value (but not exactly this same), and in the evening you want to show this readings as an average temperature during day, as a global, not from two places. So you just take average because the number of samples and scale is this same. Here I don't have this same number of samples or scale, but still I want to show the average value as in temperature. – sebap123 Nov 23 '14 at 11:24
• Is there some way you could nondimensionalize your measurements so that they collapse onto a common set of axes? This sort of manipulation is commonly done in fields like fluid mechanics. – Geoff Oxberry Nov 24 '14 at 6:46

If you know how the x-axis relates from one dataset to the next, the best solution I can think of would be to use the command 'interp1' in matlab. I've compiled a small script with output to show you some example usage. Essentially what you want to do is remap your data from each dataset so that they share some common axis, which you can do with 'interp1' in the same way I have done in my example.

close all

x1 = 1:10; %Some data size 10
y1 = x1.^2; %Some data size 10, y1(x1)

x2 = linspace(1,10,20); %Some data size 20, with different x-axis
y2 = x2.^2; %Some data size 20, with different x-axis, y2(x2)

y2interp=interp1(x2,y2,x1); %Interpolate y2 data onto x1 axis

subplot(1,2,1);plot(x1,y1,'bo-',x2,y2,'r+-');
legend('y1','y2','Location','North')
title('Original data for y1 and y2')
subplot(1,2,2);plot(x1,y1,'bo-',x1,y2interp,'r+-');
legend('y1','y2','Location','North')
title('Interpolated data for y2 plotted over y1')