I have 2 questions to do with gnuplot:
- How can I access a specific value from a data file?
- Can I plot that value against a column?
I have the following script:
plot for [iter=0:3:1] path_to_data using 1:(column(iter))
I would like to plot additional lines on this graph, based on values stored in path_to_expt.
The problem is that I want to plot an x value from one file (path_to_data: column(1)) against a constant y value from another file (path_to_expt). Is this possible?
I'm not sure of the syntax to access a cell from a file but the y value is stored at: path_to_expt[row(iter), column(1)].
Can I set a variable (expt_value) inside the above loop, equal to the y value, and plot it against path_to_sim[column(1)] as follows:
plot for [iter=0:3:1] path_to_data using 1:(column(iter)) , \
expt_value = path_to_expt[row(iter), column(1)] , \
path_to_sim using 1:expt_value
I tried this but my syntax is wrong and I can't find how to access a single value from a file. I don't know if I'll be able to plot a single value against a column but, if not, perhaps I could make a column of constant values to do this. Thank you for your help.