Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2144
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2013-10-14 10:07 -0700 |
| References | (7 earlier) <2d8e079f-e709-4122-ad24-90dd67b6c153@googlegroups.com> <91d8095a-5a86-48ca-97be-b3b79d22232d@googlegroups.com> <l38dj7$51u$1@news.rz.uni-karlsruhe.de> <48dde980-6bd1-40d9-99fe-2fd4b4863ee6@googlegroups.com> <l3gom1$qdp$1@news.rz.uni-karlsruhe.de> |
| Message-ID | <14d3e4f7-0da5-4220-a283-16b466fcb253@googlegroups.com> (permalink) |
| Subject | Re: graph from the string/numeric column. |
| From | thesunshine99@gmail.com |
On Monday, October 14, 2013 7:39:25 AM UTC-5, Karl wrote:
> Am 11.10.2013 17:12, schrieb thesunshine99@gmail.com:
>
> > cat /tmp/_pp
>
> > server1 35000 105 09-26-13
>
> > server1 35000 105 09-27-13
>
> > server1 35000 280 09-28-13
>
> > server1 35000 280 10-01-13
>
> > server1 35000 280 10-02-13
>
> > server1 35000 420 10-05-13
>
> > server1 35000 420 10-06-13
>
> >
>
> > server2 49000 0 09-26-13
>
> > server2 49000 0 09-27-13
>
> > server2 49000 0 09-28-13
>
> > server2 49000 0 09-29-13
>
> > server2 49000 0 09-30-13
>
> > server2 49000 0 10-01-13
>
> > server2 49000 0 10-02-13
>
> >
>
> >
>
> >
>
> >
>
> > for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
>
> > do
>
> > cat << EOF | /usr/local/bin/gnuplot
>
>
>
> Just print two empty lines between each block, and you can address each
>
> with "index". Then you can give an individual linecolour to each server,
>
> etc.
>
>
>
>
>
> plot "" index 1 using 4:3 with lc 1, \
>
> "" index 2 using 4:3 with lc 2, \
>
> ...
>
>
>
> or
>
>
>
> plot for [i=1:4] "" using 4:3 index i with lc i
>
>
>
>
>
> P.S. Can you switch your emailer to pure text mode for newsgroups? It
>
> looks very ugly otherwise.
I apologize the mail text mode. I am just replying from the existing mail. Not sure where to change it.
With this set of data which has two blank lines between the block.
server1 35000 105 09-26-13
server1 35000 105 09-27-13
server1 35000 280 09-28-13
server1 35000 280 09-29-13
server1 35000 280 09-30-13
server2 49000 0 09-26-13
server2 49000 0 09-27-13
server2 49000 0 09-28-13
server2 49000 0 09-29-13
server2 49000 0 09-30-13
And the code is
emptylines=`grep "^$" /tmp/_pp| wc -l`
emptylines=`expr $emptylines / 2`
for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
do
cat << EOF | /usr/local/bin/gnuplot
set terminal postscript eps enhanced color
set output "/tmp/abc.ps"
set autoscale
set grid
set title "Usage"
set xlabel "Server Name"
set ylabel "GB"
set yr [0:$maxsize]
set xr [-1:]
set xtics nomirror rotate by -90 font ",16"
set xdata time
set timefmt "%m-%d-%y"
set format x "%m/%d"
plot for [i=1:$emptylines] '/tmp/_pp' index i using 4:3 with lines lc i title '$server_name'
EOF
done
i still have no charm to fix it.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-08 13:42 -0700
Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-09 10:24 +0200
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 07:27 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 08:25 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 09:26 -0700
Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-10 09:37 +0200
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 12:41 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 13:33 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 13:53 -0700
Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-11 10:41 +0200
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-11 08:12 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-11 13:22 -0700
Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-14 14:39 +0200
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-14 10:07 -0700
Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-16 18:59 +0200
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-16 21:42 -0700
Re: graph from the string/numeric column. Karl <ratzsch@polymer.uka.de> - 2013-10-20 09:48 +0200
Re: graph from the string/numeric column. sfeam <sfeam@users.sourceforge.net> - 2013-10-20 12:08 -0700
Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-21 11:02 -0700
csiph-web