Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1624

Re: GnuPlot filtered Graph

From Uwe Scholz <nurfuernews@web.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: GnuPlot filtered Graph
Date 2013-02-12 09:41 +0100
Organization private
Message-ID <87txphdivo.fsf@web.de> (permalink)
References <54f4a553-c976-4f43-819a-3d024d39b73c@googlegroups.com>

Show all headers | View raw


Hello,

I hope to get you right...

Assuming, that your data is stored in the file data.dat, the command for
filtering might be:

for I in $(grep Win data.dat | sed -e 's/\(.*\)Win\(.*\)/\1 \2/g' | uniq -w 1 | cut -d " " -f 1); do echo $I $(egrep -e "^$I  Win" data.dat | sed -e 's/.*\([0-9]$\)/\1/g' | paste -sd+ | bc); done

The output is:

1 15
2 4
3 8

Regards,
Uwe

okzeeshan@gmail.com writes:
> Hi
> I want to make filtered data graph. Support I have the following data:
>
> 1  Win   9
> 1  Lost  9
> 1  Win   6
> 2  Win   4
> 2  Lost  3
> 3  Lost  6
> 3  Lost  7
> 3  Win   8
>
> I Want to add column three data where first column has 1 and seconds
> column has Win.
>
> For above scenario,
>
> First, second and third values of graph are 15, 4, 8.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

GnuPlot filtered Graph okzeeshan@gmail.com - 2013-02-11 17:17 -0800
  Re: GnuPlot filtered Graph Uwe Scholz <nurfuernews@web.de> - 2013-02-12 09:41 +0100
  Re: GnuPlot filtered Graph Karl <mail.kfr@gmx.net> - 2013-02-12 17:25 +0100

csiph-web