shell - using gnuplot for drawing multiple graphs -


i have data

date       instance 1, 2, 3, 4, 5, 6 03-09-2013 0 0 1 0 0 1 03-09-2013 0 0 6 0 0 6 03-09-2013 0 0 2 0 0 6 03-09-2013 0 0 3 0 0 6 03-09-2013 0 0 1 0 0 6 03-09-2013 0 0 2 0 0 6 04-09-2013 0 0 4 0 0 4 04-09-2013 0 0 8 0 0 8 04-09-2013 0 0 2 0 0 8 04-09-2013 0 0 3 0 0 4 04-09-2013 0 0 1 0 0 8 04-09-2013 0 0 5 0 0 8 

it sample of huge data. every day there 6 columns, shows 6 difference process instances.

i have pick maximum number of instances each day , plot on graph.

like on 03 sep process 3 there 6 instances, on 4 sept there 8 instances have pick maximum number of instances each date , plot graph 6 different lines depicting instances each process.

problem: writing code in shell script, how maximum number of instances each process each day. there way build data structure , find out. or need use python or perl? if so, please guide. these scripting languages new me.

2) how plot using gnuplot. example

03-09-2013 2 0 2 3 0 7 04-09-2013 6 0 4 2 0 12 05-09-2013 7 0 6 1 0 14 

my graph should have dates in x-axis, no. of process in y-axis. each line each instance, 6 lines 6 instances.

i can answer second question (more information needed first part).

with data file like

03-09-2013 2 0 2 3 0 7 04-09-2013 6 0 4 2 0 12 05-09-2013 7 0 6 1 0 14 

you can plot with

set xdata time set timefmt "%m-%d-%y" plot [ii=1:6] 'data.dat' using 1:ii title 'instance '.ii 

or replace plot for like

plot 'data.dat' using 1:2 title 'instance 1', \ 'data.dat' using 1:3 title 'instance 2', \ 'data.dat' using 1:4 title 'instance 3', \ 'data.dat' using 1:5 title 'instance 4', \ 'data.dat' using 1:6 title 'instance 5', \ 'data.dat' using 1:7 title 'instance 6' 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -