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


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

Re: Can I create "limit lines" ? Can I check if data is within them.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Christoph Bersch <usenet@bersch.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Can I create "limit lines" ? Can I check if data is within them.
Date Thu, 26 Sep 2013 09:54:10 +0200
Organization A noiseless patient Spider
Lines 60
Message-ID <l20p73$62i$1@dont-email.me> (permalink)
References <14de95f8-7c24-4bc6-ab05-b6b9b37f38d8@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 26 Sep 2013 07:54:11 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="b8f8dee7dcac88f33f36e28e66463ee6"; logging-data="6226"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3v8KEGxqaAjAxOH9ugH8x"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
In-Reply-To <14de95f8-7c24-4bc6-ab05-b6b9b37f38d8@googlegroups.com>
Cancel-Lock sha1:o9LBHuStzXR2X6g/LCqyL5DW/rk=
Xref csiph.com comp.graphics.apps.gnuplot:2048

Show key headers only | View raw


Am 26.09.2013 09:19, schrieb drkirkby@gmail.com:
>
> So I'd like a line which is -37 dB from 0 to 1000 MHz

You could draw such lines e.g. as arrows:

set arrow from first 0, first -37 rto first 1000, 0

> Up to the range 0 to 1000 MHz, anything which is above -37 dB is a
> failure, but between 1000 and 2000 MHz, something is permitted to be
> as high as -33 dB from 1000 to 2000 MHz, and -30 dB from 2000 to 3000
> MHz. Is there any way to show such lines on the graph? I know I could
> alter my data file, and add extra colums which show this, but I'm not
> keen to do that, as the data files are in a standard format, and I
> don't want to alter that.

Do this either with arrows, or use inline data:

plot '-' with steps
0    -37
1000 -33
2000 -30
3000 -30
e

The development version allows to define inline datablocks. Here, you 
would do

$db <<EOD
0    -37
1000 -33
2000 -30
3000 -30
EOD
plot $db with steps

> Those measurements were made on a Agilent / HP 8720D vector network
> analyzer (VNA). The VNA allows one to set limits, and indicates at
> any points the measured data fails to meet the specification. For
> those devices, they easily meet the spec. Is there any way in Gnuplot
> to do such testing, so Gnuplot could be configured to print PASS or
> FAIL on a plot, depending on the contents of the data?

You can use the 'stats' command to extract some statistical data 
(version >= 4.6.0):

datafile='mydata.dat'

stats [0:1000] datafile using 1:2
if (STATS_max_y > -37) {
     set label at first 500, graph 0.1 center 'PASS' lc rgb 'green'
} else {
     set label at first 500, graph 0.1 center 'FAIL' lc rgb 'red'
}
stats [1000:2000] datafile using 1:2
...

If you have more ranges, this could also be iterated.

Christoph

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


Thread

Can I create "limit lines" ? Can I check if data is within them. drkirkby@gmail.com - 2013-09-26 00:19 -0700
  Re: Can I create "limit lines" ? Can I check if data is within them. Christoph Bersch <usenet@bersch.net> - 2013-09-26 09:54 +0200
    Re: Can I create "limit lines" ? Can I check if data is within them. Christoph Bersch <usenet@bersch.net> - 2013-09-26 09:55 +0200
      Re: Can I create "limit lines" ? Can I check if data is within them. "Dr. David Kirkby" <drkirkby@gmail.com> - 2013-09-26 05:30 -0700

csiph-web