I'm looking for a way to plot data from different files into one graph.
I'm testing different approaches to a problem. I have some parameters and I'm trying to conclude how the results are related to these parameters. I run some tests on the different solutions I'm comparing, and I redo this several times with different parameters.
So I have several .csv files looking like this.
test1 test2 test3 test4 ...
sol1 1 1 1 1
sol2 1 1 1 1
sol3 1 1 1 1
sol4 1 1 1 1
...
(These are of course filled with real data and not just 1's)
I want to plot a graph where the Y axis is the result of (for example) test1/sol1 and the x axis plots the different parameter values (the different .csv files).
I hope I have made clear what i'm trying to create.
I am hoping there is a way of doing this directly in gnuplot. The file structure is this way in order to create some other graphs, so I don't really want to change it.
I read about the possibility of concatenating two files, but i don't really see that of being much use here.
EDIT: (thanks to Christoph) I want to plot the value in the cell test1/sol1 vs my parameter. The parameter is changing per file. So I need to read 1 datapoint per file.
In the end I would like to plot this information for different solutions in one graph. So for the cells test1/sol1, test1/sol2, test1/sol3,...
In the example below, the x axis would be the changing parameter, the Y axis would be the value in the corresponding cell from column 'test1' and the different lines correspond to the different solutions.
(source: googlecode.com)
(random image from google)
I hope it's clearer now what I'm trying to achieve.
test1/sol1
supposed to be on the y-axis? Do you want to plot the value in the celltest1/sol1
vs. the respective parameter (contained in the filename?)? You could do that with iterations likeplot for [file in filelist]
, but that won't work with lines, only with boxes, or points etc. Also, possible solutions depend on other values, which you want to include in the plot: shouldsol1
appear somewhere ortest1
? What about the parameter value etc. – Christophset table
and then replot it. – Christoph