plotgraphgnuplot

how to use gnuplot with one x and several y


i need to make a plot from the file that have struct like that:

x1, y1, y2, y3, y4

x2, y1, y2, y3, y4

x3, y1, y2, y3, y4

I am tried something like set datafile separator ',' but with that he make plot with only x1 and y1


Solution

  • If the number of columns stays the same, you can tell gnuplot which columns to use:

    plot 'file.dat' using 1:2, '' using 1:3, '' using 1:4, '' using 1:5