Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #981 > unrolled thread
| Started by | bryan <bryanlepore@gmail.com> |
|---|---|
| First post | 2012-03-17 11:39 -0700 |
| Last post | 2012-03-19 08:25 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
data cutoff threshold for `plot` bryan <bryanlepore@gmail.com> - 2012-03-17 11:39 -0700
Re: data cutoff threshold for `plot` ab <ab.3942@googlemail.com> - 2012-03-19 00:26 -0700
Re: data cutoff threshold for `plot` bryan <bryanlepore@gmail.com> - 2012-03-19 08:25 -0700
| From | bryan <bryanlepore@gmail.com> |
|---|---|
| Date | 2012-03-17 11:39 -0700 |
| Subject | data cutoff threshold for `plot` |
| Message-ID | <13798827.2811.1332009596089.JavaMail.geo-discussion-forums@vbze11> |
[ gnuplot 4.6 ] Is there something like a threshold that applies to a single plot type after `plot` is given? If this can be done using two y-axes, there's already a lot in the newsgroup for that I can try. I have some x/y data. I'd like to combine impulses with a line, however, I'd like to plot the line for data below some threshold. e.g. impulses for all data, but a line to connect tops of the impulses for data points below some value e.g. 5000 (see below) imaginary pseudo-code to illustrate what I'd like to do: yrange [0:10000] plot \ 'data.dat' u 1:2 w i, \ '' u 1:2 w l threshold=5000 ... so the plot will have impulses above 5000 that stand alone and are not connected to those below 5000. the ones below will appear connected. -Bryan
[toc] | [next] | [standalone]
| From | ab <ab.3942@googlemail.com> |
|---|---|
| Date | 2012-03-19 00:26 -0700 |
| Message-ID | <f588dd23-ba05-4efc-8603-83bdafbb4e0d@l14g2000vbe.googlegroups.com> |
| In reply to | #981 |
On 17 Mrz., 19:39, bryan <bryanlep...@gmail.com> wrote: > [ gnuplot 4.6 ] > Is there something like a threshold that applies to a single plot type after `plot` is given? If this can be done using two y-axes, there's already a lot in the newsgroup for that I can try. > > I have some x/y data. I'd like to combine impulses with a line, however, I'd like to plot the line for data below some threshold. e.g. impulses for all data, but a line to connect tops of the impulses for data points below some value e.g. 5000 (see below) > > imaginary pseudo-code to illustrate what I'd like to do: > > yrange [0:10000] > plot \ > 'data.dat' u 1:2 w i, \ > '' u 1:2 w l threshold=5000 > > ... so the plot will have impulses above 5000 that stand alone and are not connected to those below 5000. the ones below will appear connected. > > -Bryan Hi, try to use the ternary operator f_below(x) = x<5000? x : NaN # Will skip everything above 5000 f_above(x) = x<5000? NaN : x now you can plot f_below and f_above individually using lines, impules or whatever.
[toc] | [prev] | [next] | [standalone]
| From | bryan <bryanlepore@gmail.com> |
|---|---|
| Date | 2012-03-19 08:25 -0700 |
| Message-ID | <3038101.561.1332170747024.JavaMail.geo-discussion-forums@vbhy1> |
| In reply to | #987 |
On Monday, March 19, 2012 3:26:02 AM UTC-4, ab wrote: > try to use the ternary operator `help ternary` - that's it! Thanks! -Bryan
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web