Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2088
| From | Olaf Schultz <o.newsa@enhydralutris.de> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: change line color when plot crosses Y value |
| Date | 2011-01-28 15:53 +0000 |
| Message-ID | <8qg73bFjd1U2@mid.individual.net> (permalink) |
| References | <15c8f4bc-fd7b-4486-972d-9321f6c96c62@m27g2000prj.googlegroups.com> |
On Fri, 28 Jan 2011 06:41:28 -0800, ginginsman wrote: > I know I have seen this somewhere but cannot find it: I'd like to find a > way to change the color of a plot line when it crosses a specified value > of Y; blue above, red below, for example. > > with data like this: > > 2011/02/01-03:31 0.59 > 2011/02/01-09:48 9.93 > 2011/02/01-16:11 -0.34 > 2011/02/01-22:24 8.88 > 2011/02/02-04:18 0.44 > 2011/02/02-10:32 9.96 > 2011/02/02-16:53 -0.36 > > set xdata time > set timefmt x "%Y/%m/%d-%H:%M" > set samples 1000 > plot 'data.txt' u 1:2 sm cspl > > Find a way to change the curve color at any value > or < 1 (for > example). maybe the hard way: ycr=0.1 plot "data.txt u 1:($2>ycr?$2:1/0) lt 1 ,"" u 1:($2<=ycr?$2:1/0) lt 2 t "" > OSX 10.6.6 > GNUplot Version 4.4 patchlevel 2
Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar | Unroll thread
Re: change line color when plot crosses Y value Olaf Schultz <o.newsa@enhydralutris.de> - 2011-01-28 15:53 +0000
csiph-web