[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info
Subject:    Re: [Gnuplot-info] plot dstat output cvs file
From:       Theo <theozh () gmx ! net>
Date:       2013-11-08 13:43:25
Message-ID: l5ippn$47q$1 () ger ! gmane ! org
[Download RAW message or body]

Hi Bart,

there is a solution :-)
Not very elegant but the result is important...
Basically, you are creating a few dummy plots thereby extracting the 
columnheaders into string variables.
Then you create your desired plot using those variables.

Let me know whether it also works for you.

Theo.


I used the reduced data "Bart.dat":


"Dstat 0.7.2 CSV output"
"Author:","Dag Wieers <dag@wieers.com>",,
"Host:","maverick",,
"Cmdline:","dstat -tv --output dstat_timed.csv",,

"system","procs",,
"time","run","blk","new"
30-10 11:19:41,0.000,0.0,1.284,729153536.0
30-10 11:19:42,0.0,0.0,0.0,729186304.0
30-10 11:19:43,0.0,0.0,1.0,729186304.0
30-10 11:19:44,0.0,0.0,1.0,729194496.0
30-10 11:19:45,0.0,0.0,17.0,730214400.0



set datafile separator ","

# extract the columheaders from block 1 and point 1
# and store them in variables
# this will create some warnings which can be ignored
plot "Bart.dat" u (TitleCol2=stringcolumn(2),1):0 every ::1:1:1:1
plot "Bart.dat" u (TitleCol3=stringcolumn(3),1):0 every ::1:1:1:1
plot "Bart.dat" u (TitleCol4=stringcolumn(4),1):0 every ::1:1:1:1

set xlabel "Time"
set xdata time
set timefmt "%d-%m %H:%M:%S"
set format x "%H:%M"
set xrange [*:*]

plot "Bart.dat" u 1:2 every ::2:1 w lp t TitleCol2, \
              '' u 1:3 every ::2:1 w lp t TitleCol3, \
		 '' u 1:4 every ::2:1 w lp t TitleCol4





------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
gnuplot-info mailing list
gnuplot-info@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic