Reputation: 83
I'm trying to plot a graph with linepoints and the first column is a string and a I need to use xticlabels to plot the data to the second column related to it.
This is my data file, the third column I wish to use the set the point color
"0000" 0 0
"0001" 9 0
"0010" 16 0
"0011" 25 1
"0100" 14 0
"0101" 23 0
"0110" 30 0
"0111" 39 1
"1000" 30 0
"1001" 39 0
"1010" 46 2
"1100" 44 0
I used:
set palette defined (0 "blue", 1 "yellow", 2 "red")
plot "data.dat" using 2:xticlabels(1) with linespoints ls 1 notitle
How can I change this command to plot each point color to use the appropriate point color?
Thanks in advance
Upvotes: 2
Views: 2231
Reputation: 3765
If I understand correctly, this is what you need:
plot "data.dat" using 0:2:3:xticlabels(1) with linespoints ls 1 lc palette notitle
Upvotes: 3