[rrd-users] outputting lines and legends in order of weighting

Joseph Mack NA3T jmack at wm7d.net
Mon Jul 14 01:36:13 CEST 2008


On Mon, 14 Jul 2008, Alex van den Bogaerdt wrote:

> On Thu, Jul 10, 2008 at 06:04:10PM -0700, Joseph Mack NA3T wrote:
>
>> However when I plot the boxes in the legend with the colors
>> and value of offset for each ntp peer with the lowest
>> priority lines being written first, the lowest priority peer
>> is written out in the legend first. Is there a way to write
>> out the highest priority legend (and its color) first?
>>
>> I'm happy to do some fakery, eg make two passes at writing
>> out the data (eg one for the lines in one order and another
>> for the legend in the other order), but I can't figure how
>> to do it.
>
> First draw the lines without a legend.
> Then write a legend without drawing a line. To do this, you need
> to draw something blank. And this in turn means you first need to
> generate something blank.

thanks I've done a trial run and haven't got data which 
differentiates my new way from the old way yet.

What I've done is draw the error/jitter bands in reverse 
order, with no legend, then drawn the data lines, in forward 
order with legend. The lines are narrow enough that I don't 
really care if the last (lower precision) one overwrites the 
first one.

>
> If you have:
>
> DEF:ds0=test.rrd:ds0:AVERAGE \
> DEF:ds1=test.rrd:ds1:AVERAGE \
> LINE:ds0#FF0000:ds0 \
> LINE:ds1#0000FF:ds1 \
>
> then you change above two LINE in below CDEF and four LINE:
>
> CDEF:not=ds0,POP,UNKN \
> LINE:ds0#FF0000 \
> LINE:ds1#0000FF \
> LINE:not#0000FF:ds1 \
> LINE:not#FF0000:ds0 \
>
> HTH

Thanks

Am keeping my eye on the data for some obvious lower 
priority jitter bands obliterating the higher priority bands

Joe


-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the rrd-users mailing list