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


Groups > comp.graphics.apps.gnuplot > #2047 > unrolled thread

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

Started bydrkirkby@gmail.com
First post2013-09-26 00:19 -0700
Last post2013-09-26 05:30 -0700
Articles 4 — 3 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  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

#2047 — Can I create "limit lines" ? Can I check if data is within them.

Fromdrkirkby@gmail.com
Date2013-09-26 00:19 -0700
SubjectCan I create "limit lines" ? Can I check if data is within them.
Message-ID<14de95f8-7c24-4bc6-ab05-b6b9b37f38d8@googlegroups.com>
I am measuring some properties of a devices and plotting them. A typical plot is shown here

http://www.vnacalibration.co.uk/Kits/SN0014/loads.pdf

First, I should state a definition. 

Return loss = -(|S11| or |S22|)

so if a graph shows -40 dB, it indicates a return loss of +40 dB. 

I would like to plot on the graph the limits of the specification, so it can be seen more easily the device is meeting the spec. So I'd like a line which is -37 dB from 0 to 1000 MHz, then 

The devices have a specification as noted. The lower down (more negative) the y-axis is, the better the device is performing. 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. 

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? I expect that is asking too much of a plotting program, but I thought I'd ask anyway. 

Dave

[toc] | [next] | [standalone]


#2048

FromChristoph Bersch <usenet@bersch.net>
Date2013-09-26 09:54 +0200
Message-ID<l20p73$62i$1@dont-email.me>
In reply to#2047
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

[toc] | [prev] | [next] | [standalone]


#2049

FromChristoph Bersch <usenet@bersch.net>
Date2013-09-26 09:55 +0200
Message-ID<l20p8l$62i$2@dont-email.me>
In reply to#2048
Am 26.09.2013 09:54, schrieb Christoph Bersch:
> 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

That should have been:

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

Christoph

[toc] | [prev] | [next] | [standalone]


#2050

From"Dr. David Kirkby" <drkirkby@gmail.com>
Date2013-09-26 05:30 -0700
Message-ID<0808a8ce-4d1a-4f98-b85b-5f93fdaecf17@googlegroups.com>
In reply to#2049
On Thursday, 26 September 2013 08:55:01 UTC+1, Christoph Bersch  wrote:

> That should have been:
> 
> 
> 
> set arrow from first 0, first -37 rto first 1000, 0 nohead
> 
> 
> 
> Christoph

Thank you Christoph, that done what I wanted. I'll try out the stats stuff later. 

Dave 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web