From: Thomas S. <t.s...@fz...> - 2010-11-23 10:35:43
|
try this: y1=y2=y3=0 plot './eva.dat1' using 1:(strstrt(stringcolumn(4),"5000-1FE1-5000-BDDC") ?(y1=$2+$3,y1) : y1) with linespoints title "ARRAY01/B/1",''using 1:(strstrt(stringcolumn(4),"5000-1FE1-5000-BDDD") ?(y2=$2+$3,y2) : y2) with linespoints title "ARRAY01/B/2",'' using 1:(strstrt(stringcolumn(4),"5000-1FE1-5000-BDDE") ?(y3=$2+$3,y3) : y3) with linespoints title "ARRAY01/B/3" explanation: stringcolumn(.) == "string" doesn't work, but strstr(stringcolumn(.),"string") does. using 'NaN' sets the datapoint to 'undefined' and this interrupts the plot - this way you don't get lines between the points. so it's better to just plot the last valid point again. (and omit the 'multiplot', you don't need it for a single plot.) mbm329 wrote: > > Hello, > > I'm trying to plot read and write requests from a storage array. I > have an application that dumps data with each array controller's read > and write requests on a separate line. I'd rather not mangle the data > from the original application's dump if possible. Within gnuplot, I'm > trying to conditionally say, "If the 4th column is <predetermined > name>, then plot the sum of columns 2 and 3." It's not working out > for me, so far. Instead of three lines, I get a single line with > multiple points on the same y axis. Below is my config and data file. > Is this even possible with gnuplot? Any help is certainly > appreciated. > > Thanks, > > Mike > > ############################ > A sample of the gnuplot config that is not working properly: > > set title "Array I/O" > set terminal png size 1024,768 > set output "/var/www/html/eva.png" > set key below reverse height 1 width -1 box > set grid x y > set datafile separator "," > set multiplot > set origin 0.0,0.0 > set size 1.0,1.0 > set xlabel "Time (MM/DD:HH:MM:SS)" > set xdata time > set xtics rotate by -70 > set timefmt "%d/%b/%Y %H:%M:%S" > set format x "%m/%d:%H:%M:%S" > set xrange [ "5/Nov/2010 00:56:29" : "5/Nov/2010 00:57:25" ] > set ylabel "Req/sec" > set format y "%10.0f" > set yrange [ 0 : 5000 ] > plot\ > './eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDC" ? > ($2+$3) : NaN) with linespoints title "ARRAY01/B/1",\ > './eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDD" ? > ($2+$3) : NaN) with linespoints title "ARRAY01/B/2",\ > './eva.dat1' using 1:(stringcolumn(4) == "5000-1FE1-5000-BDDE" ? > ($2+$3) : NaN) with linespoints title "ARRAY01/B/3" > set nomultiplot > > > ############################ > A sample of the data file: > > 5/Nov/2010 00:56:30,3043,71,5000-1FE1-5000-BDDC > 5/Nov/2010 00:56:30,1043,71,5000-1FE1-5000-BDDD > 5/Nov/2010 00:56:30,2023,71,5000-1FE1-5000-BDDE > 5/Nov/2010 00:56:34,3371,61,5000-1FE1-5000-BDDC > 5/Nov/2010 00:56:34,3173,60,5000-1FE1-5000-BDDD > 5/Nov/2010 00:56:34,1139,42,5000-1FE1-5000-BDDE > 5/Nov/2010 00:56:44,2905,110,5000-1FE1-5000-BDDC > 5/Nov/2010 00:56:44,3074,88,5000-1FE1-5000-BDDD > 5/Nov/2010 00:56:44,1352,76,5000-1FE1-5000-BDDE > 5/Nov/2010 00:56:54,3355,58,5000-1FE1-5000-BDDC > 5/Nov/2010 00:56:54,2932,170,5000-1FE1-5000-BDDD > 5/Nov/2010 00:56:54,2015,38,5000-1FE1-5000-BDDE > 5/Nov/2010 00:57:04,3115,120,5000-1FE1-5000-BDDC > 5/Nov/2010 00:57:04,3197,85,5000-1FE1-5000-BDDD > 5/Nov/2010 00:57:04,2546,92,5000-1FE1-5000-BDDE > 5/Nov/2010 00:57:14,1163,121,5000-1FE1-5000-BDDC > 5/Nov/2010 00:57:14,1408,51,5000-1FE1-5000-BDDD > 5/Nov/2010 00:57:14,3521,33,5000-1FE1-5000-BDDE > 5/Nov/2010 00:57:24,1412,58,5000-1FE1-5000-BDDC > 5/Nov/2010 00:57:24,2612,85,5000-1FE1-5000-BDDD > 5/Nov/2010 00:57:24,1589,52,5000-1FE1-5000-BDDE > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/Plotting-row-oriented-data-tp30282816p30283789.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |