-=head1 NOTES on legend arguments
-
-=head2 Escaping the colon
-
-In a ':' in a I<legend> argument will mark the end of the legend. To
-enter a ':' into a legend, the colon must be escaped with a backslash '\:'.
-Beware, that many environments look for backslashes themselves, so it may
-be necessary to write two backslashes so that one is passed onto rrd_graph.
-
-=head2 String Formatting
-
-The text printed below the actual graph can be formated by appending special
-escaped characters at the end of a text. When ever such a character occurs,
-all pending text is pushed onto the graph according to the character
-specified.
-
-Valid markers are: B<\j> for justified, B<\l> for left aligned, B<\r> for
-right aligned and B<\c> for centered. In the next section there is an
-example showing how to use centered formating.
-
-Normally there are two space characters inserted between every two items
-printed into the graph. The space following a string can be suppressed by
-putting a B<\g> at the end of the string. The B<\g> also squshes any space
-inside the string if it is at the very end of the string. This can be used
-in connection with B<%s> to supress empty unit strings.
-
- GPRINT:a:MAX:%lf%s\g
-
-A special case is COMMENT:B<\s> this inserts some additional vertical space
-before placing the next row of legends.
-
-=head1 NOTE on Return Values
-
-Whenever rrd_graph gets called, it prints a line telling the size of
-the gif it has just created to STDOUT. This line looks like this: XSIZExYSIZE.
-
-=head1 EXAMPLE 1
-
- rrdtool graph demo.gif --title="Demo Graph" \
- DEF:cel=demo.rrd:exhaust:AVERAGE \
- "CDEF:far=cel,1.8,*,32,+"" \
- LINE2:cel#00a000:"D. Celsius" \
- LINE2:far#ff0000:"D. Fahrenheit\c"
-
-=head1 EXAMPLE 2
-
-This example demonstrates the syntax for using IF and UN to set
-I<*UNKNOWN*> values to 0. This technique is useful if you are
-aggregating interface data where the start dates of the data sets
-doesn't match.
-
- rrdtool graph demo.gif --title="Demo Graph" \
- DEF:idat1=interface1.rrd:ds0:AVERAGE \
- DEF:idat2=interface2.rrd:ds0:AVERAGE \
- DEF:odat1=interface1.rrd:ds1:AVERAGE \
- DEF:odat2=interface2.rrd:ds1:AVERAGE \
- CDEF:agginput=idat1,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,* \
- CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \
- AREA:agginput#00cc00:Input Aggregate \
- LINE1:agginput#0000FF:Output Aggregate
-
-Assuming that idat1 has a data value of I<*UNKNOWN*>, the CDEF expression
-
- idat1,UN,0,idat1,IF
-
-leaves us with a stack with contents of 1,0,NaN and the IF function
-will pop off the 3 values and replace them with 0. If idat1 had a
-real value like 7942099, then the stack would have 0,0,7942099 and the
-real value would be the replacement.
-
-=head1 EXAMPLE 3
-
-This example shows two ways to use the INF function. First it makes
-the background change color during half of the hours. Then, it uses
-AREA and STACK to draw a picture. If one of the inputs was UNKNOWN,
-all inputs are overlaid with another AREA.
-
- rrdtool graph example.png --title="INF demo" \
- DEF:val1=some.rrd:ds0:AVERAGE \
- DEF:val2=some.rrd:ds1:AVERAGE \
- DEF:val3=some.rrd:ds2:AVERAGE \
- DEF:val4=other.rrd:ds0:AVERAGE \
- CDEF:background=val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF \
- CDEF:wipeout=val1,val2,val3,val4,+,+,+,UN,INF,UNKN,IF \
- AREA:background#F0F0F0 \
- AREA:val1#0000FF:Value1 \
- STACK:val2#00C000:Value2 \
- STACK:val3#FFFF00:Value3 \
- STACK:val4#FFC000:Value4 \
- AREA:wipeout#FF0000:Unknown
-
-The first CDEF uses val4 as a dummy value. It's value is removed immediately
-from the stack. Then a decision is made based on the time that a sample was
-taken. If it is an even hour (UTC time !) then the area will be filled. If
-it is not, the value is set to UNKN and is not plotted.
-
-The second CDEF looks if any of val1,val2,val3,val4 is unknown. It does so by
-checking the outcome of sum(val1,val2,val3,val4). Again, INF is returned when
-the condition is true, UNKN is used to not plot the data.
-
-The different items are plotted in a particular order. First do the background, then use a
-normal area to overlay it with data. Stack the other data until they are all plotted. Last but
-not least, overlay everything with eye-hurting red
-to signal any unknown data.
-
-Note that this example assumes that your data is in the positive half of the y-axis
-otherwhise you would would have to add NEGINF in order to extend the coverage
-of the rea to whole graph.