[rrd-users] Re: printing variables
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Fri Jul 20 19:45:04 MEST 2001
Gil Coutinho wrote:
> I have the a problem with printing some data on the bottom of my graphs.
> I want to make a tabular view like this:
>
> Last Max Min
> Var 1: 3.2 5.6 2.0
> Var 2: 4.5 6.0 2.4
>
> (and so on; I trust you are using a monotype font)
>
> The problem is with the %lf precision.
> I can use %.1lf to limit the number of decimal spaces after the dot, but i
> can't seem to specify the number o digits on the left of the dot.
> This way, if the value grows to 10, I get my table desaligned.
%X,Ylf where X is the total field width and Y is the number of digits
after the decimal point.
So, if you need to be able to print "123456789012.12" the total
field width needs to be 15 (12 digits before and 2 digits after
the decimal point, 12+1+2==15) and the string to use is "%15.2lf".
HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/ |
| http://rrdtool.eu.org --> tutorial |
+----------------------------------------------------------------------+
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list