Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

You are in the hall of the mountain king.


computers / comp.graphics.apps.gnuplot / Plot data using every

SubjectAuthor
* Plot data using everys1291
`* Re: Plot data using everyHans-Bernhard_Bröker
 `* Re: Plot data using everys1291
  `- Re: Plot data using everyKarl Ratzsch

1
Subject: Plot data using every
From: s1291
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 30 Oct 2019 14:38 UTC
X-Received: by 2002:a37:b981:: with SMTP id j123mr173971qkf.205.1572446298437;
Wed, 30 Oct 2019 07:38:18 -0700 (PDT)
X-Received: by 2002:a9d:5911:: with SMTP id t17mr196276oth.82.1572446298200;
Wed, 30 Oct 2019 07:38:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!j16no3925736qtl.0!news-out.google.com!d16ni480qtp.0!nntp.google.com!j16no3925731qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 30 Oct 2019 07:38:18 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.194.70.2; posting-account=HagNvQoAAAC7MSycpc32gp8SxSlBD4dx
NNTP-Posting-Host: 193.194.70.2
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <661235d5-152e-4168-b657-87432e7eade1@googlegroups.com>
Subject: Plot data using every
From: samirmat...@gmail.com (s1291)
Injection-Date: Wed, 30 Oct 2019 14:38:18 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hello,
I have a single block of data points in a file: data.dat, For example let's consider the following example of data.dat file:

1 1.0
2 2.0
3 3.0
4 4.0
5 5.0
6 6.0
7 7.0

To plot only the points with odd x value:

plot 'data.dat' u 1:2 every 2 w lp

This will plot the points (1, 1.0), (3, 3.0), (5, 5.0), (7, 7.0).

What if I want to plot the points with even x value using 'every' keyword? that is, the points (2, 2.0), (4, 4.0) (6, 6.0).

Thanks


Subject: Re: Plot data using every
From: Hans-Bernhard_Bröke
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 30 Oct 2019 19:19 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From: HBBroe...@t-online.de (Hans-Bernhard_Bröker)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Plot data using every
Date: Wed, 30 Oct 2019 20:19:26 +0100
Lines: 6
Message-ID: <349c35dd-78cb-e7d9-9041-9f1d84ca2009@t-online.de>
References: <661235d5-152e-4168-b657-87432e7eade1@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: news.dfncis.de ZRRsB/qObOqPwnTKpzchlARndUjNRqVXtue63tE6AwSH36S+huPxHKZi1v
Cancel-Lock: sha1:382skNlW5fSj63L6HfEb34C2Zng=
Autocrypt: addr=HBBroeker@t-online.de; keydata=
mQINBFu0018BEAC34KXenx8N+WV5OOk0YGkpMbnplVar2DFCNTIDEYA6d8S84mD2IB6/R29G
gmE0NNKwt5C0vFvETkF1K8iZlI6TxzmtmTMqQk5lGWnxbv02EsSJu4drIwQssCfYoZ0y3XhL
gUlZa2PrLvrEDI4HHeYCd87xagdsDX2+fBjMMBqnvYgyAU5UOhhG+R6s/8UtHlzyeJTLYXQQ
zYcOFpcX3Q7BsDQukVAhh8RW2ss44TrNmyxbd63dWlG7ZgW525PaA02PsHVSLQz7uIg38S/a
/wtB6VqzudvYwcekMyM/XSn/bxaUCHcGGfW81Nd2YtxH5HuqGddHuuQF2vFuVrF+8dA/rPdS
xUd8ENaP5bueFWg2hWJb7m/uTGHOPNUeITDNLXpIElGZmqchb3j2kkzsebVlsa2BoYWdK4Aa
16gS0TzcgbAaPE5QRyKQlG/KEgUn6N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XGVdjRYBOnKL4ao
tqDMPJrR5d0JKgzxrCCkp76fz9pZB60XhZaEM8iZkUknulrSOVS+RQfatpLtc6I4laf39mNi
gJAx91jvpaTwvVMGZIcA3S+710LmNl+X+lWyymh9srSllmrjmCM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.2.0
In-Reply-To: <661235d5-152e-4168-b657-87432e7eade1@googlegroups.com>
Content-Language: de-DE
View all headers
Am 30.10.2019 um 15:38 schrieb s1291:

What if I want to plot the points with even x value using 'every' keyword? that is, the points (2, 2.0), (4, 4.0) (6, 6.0).

Then you continue reading the documentation of the 'every' option, which
you already found.


Subject: Re: Plot data using every
From: s1291
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 30 Oct 2019 19:29 UTC
References: 1 2
X-Received: by 2002:a0c:aac2:: with SMTP id g2mr731294qvb.205.1572463755838;
Wed, 30 Oct 2019 12:29:15 -0700 (PDT)
X-Received: by 2002:aca:a8ca:: with SMTP id r193mr708021oie.61.1572463755308;
Wed, 30 Oct 2019 12:29:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!j16no4673505qtl.0!news-out.google.com!d16ni514qtp.0!nntp.google.com!j16no4673500qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 30 Oct 2019 12:29:14 -0700 (PDT)
In-Reply-To: <349c35dd-78cb-e7d9-9041-9f1d84ca2009@t-online.de>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.194.70.2; posting-account=HagNvQoAAAC7MSycpc32gp8SxSlBD4dx
NNTP-Posting-Host: 193.194.70.2
References: <661235d5-152e-4168-b657-87432e7eade1@googlegroups.com> <349c35dd-78cb-e7d9-9041-9f1d84ca2009@t-online.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fb8066d6-4589-4feb-8c3d-d0dbba902e3c@googlegroups.com>
Subject: Re: Plot data using every
From: samirmat...@gmail.com (s1291)
Injection-Date: Wed, 30 Oct 2019 19:29:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
On Wednesday, October 30, 2019 at 8:19:30 PM UTC+1, Hans-Bernhard Bröker wrote:
Am 30.10.2019 um 15:38 schrieb s1291:

What if I want to plot the points with even x value using 'every' keyword? that is, the points (2, 2.0), (4, 4.0) (6, 6.0).

Then you continue reading the documentation of the 'every' option, which
you already found.

Thank you for your reply.
I've read the documentation but I don't see how to do that.
Could you just post it?
Thanks


Subject: Re: Plot data using every
From: Karl Ratzsch
Newsgroups: comp.graphics.apps.gnuplot
Organization: solani.org
Date: Thu, 31 Oct 2019 07:38 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: mail....@gmx.net (Karl Ratzsch)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Plot data using every
Date: Thu, 31 Oct 2019 08:38:25 +0100
Organization: solani.org
Lines: 29
Message-ID: <qpe31k$gos$1@solani.org>
References: <661235d5-152e-4168-b657-87432e7eade1@googlegroups.com>
<349c35dd-78cb-e7d9-9041-9f1d84ca2009@t-online.de>
<fb8066d6-4589-4feb-8c3d-d0dbba902e3c@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: solani.org 1572507508 17180 127.0.0.43 (31 Oct 2019 07:38:28 GMT)
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Thu, 31 Oct 2019 07:38:28 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
Thunderbird/60.9.0
In-Reply-To: <fb8066d6-4589-4feb-8c3d-d0dbba902e3c@googlegroups.com>
Cancel-Lock: sha1:mRPEziCmPPXyA7phEjoUtD0BBj8=
X-User-ID: eJwNysERACAIA7CVAKHgOIjX/UfQvBMLiklHwINB7syrkC41XNORUdmHbtPWaDp+qJOLWlL2ABIqEJs=
Content-Language: de-DE-1901
View all headers
Am 30.10.2019 um 20:29 schrieb s1291:
On Wednesday, October 30, 2019 at 8:19:30 PM UTC+1, Hans-Bernhard Bröker wrote:
Am 30.10.2019 um 15:38 schrieb s1291:

What if I want to plot the points with even x value using 'every' keyword? that is, the points (2, 2.0), (4, 4.0) (6, 6.0).

Then you continue reading the documentation of the 'every' option, which
you already found.

Thank you for your reply.
I've read the documentation but I don't see how to do that.

Read again ;) (under "help every")

      plot 'file' every {<point_incr>}
                          {:{<block_incr>}
                            {:{<start_point>}
                              {:{<start_block>}
                                {:{<end_point>}
                                  {:<end_block>}}}}}

Your default start_point is zero. You just set it to "1":

    plot dataf every 2::1

Alternative (plot even data, not even point/line numbers)

    plot dataf us ($1 % 2 == 0 ? $1 : NaN):2



1
rocksolid light 0.7.2
clearneti2ptor