[rrd-users] AW: plot positive and negative in different colours

Baumann, Christoph CHRISTOPH.BAUMANN at T-SYSTEMS.CH
Tue Oct 31 12:01:29 MET 2006


Hi Dave
Perhaps you make something like this:

DEF:a=Sonefive.rrd:wert:MAX
CDEF:B=a,5,LT,a,UNKN,IF

You get something like the attached png.

Just change 5 with 0 and LT with LE, GT, GE, EQ, NE (what you want) 

Greets Christoph



-----Ursprüngliche Nachricht-----
Von: rrd-users-bounce at list.ee.ethz.ch [mailto:rrd-users-bounce at list.ee.ethz.ch] Im Auftrag von Dave Holland
Gesendet: Dienstag, 31. Oktober 2006 10:39
An: rrd-users at list.ee.ethz.ch
Betreff: [rrd-users] plot positive and negative in different colours

Hi,

I have a data value which can be positive or negative. I'm trying to
figure out how to make rrd plot graphs with the line one colour for
positive data, and a different colour for negative data.

So far I have this:

  rrdtool graph out.png DEF:x=foo.rrd:data:LAST CDEF:n=x,DUP,0,LT,*
  CDEF:p=x,DUP,0,GT,* AREA:n#ff0000 AREA:p#0000ff

which gets me a filled graph; positive in blue, negative in red. OK so
far: http://eyas.biff.org.uk/~dave/test3.png

But I'd like a line graph. If I change AREA to be LINE2 then I get a
weird discontinuity when the data changes sign. See for example
http://eyas.biff.org.uk/~dave/test4.png just before the end of week 41.
There's also the issue of the horizontal line at zero; I can disguise
that with a HRULE but it's a bit ugly.

How can I get a single line plotted which changes colour appropriately?

thanks,
Dave
-- 
** Dave Holland ** Systems Support -- Special Projects Team **
** 01223 496923 ** Sanger Institute, Hinxton, Cambridge, UK **

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


-- Attached file removed by Ecartis and put at URL below --
-- Type: image/png
-- Desc: load_wechselndeFarbe_linie.png
-- Size: 63k (65207 bytes)
-- URL : http://lists.ee.ethz.ch/p/load_wechselndeFarbe_linie.png


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list