From: Aaron R. <aar...@gm...> - 2012-11-01 07:34:54
|
Hello, I'm wondering if there is a way to set the line style based on a value from the plotted data? I'm trying to have all of my data in a single file and just iterate over it. I want to use a column value to indicate what color the line should be draw (may have same type of data from multiple sources- color is used to indicate type. I haven't been able to get anything to work yet. Sample data: #yindex data_label type_indicator start length 0 LABEL1 1 20 10 0 LABEL1 1 60 20 1 LABEL2 2 10 90 2 LABEL3 1 100 50 gnuplot file: set style line 1 lt rgb 'black' lw 10 set style line 2 lt rgb "cyan" lw 10 I want to have something like this: plot DATAFILE using 4:1:5:(0):ytic(2) with vectors notitle nohead ls ($3) instead of: plot DATAFILE using 4:1:5:(0):ytic(2) index 0 with vectors notitle nohead ls 1, \ DATAFILE using 4:1:5:(0):ytic(2) index 1 with vectors notitle nohead ls 2, \ DATAFILE using 4:1:5:(0):ytic(2) index 2 with vectors notitle nohead ls 1, \ ... index n Thanks for any suggestions. -Aaron |