I am still experiencing this issue, so I thought I would pass along a link to a live example:
http://portal.lagged.ca/ Here is the script used to generate the top left graph: rrdtool graph eth0.png \ --title "External Network Traffic - Daily" \ --start -1day \ --imgformat PNG \ --x-grid HOUR:1:HOUR:4:HOUR:4:0:%H\:%M \ --vertical-label "Bytes / Second" \ --grid-dash 1:0 \ --width 425 \ DEF:in=/share/scripts/rrdtool/db/eth${i}.rrd:in:AVERAGE \ DEF:out=/share/scripts/rrdtool/db/eth${i}.rrd:out:AVERAGE \ VDEF:inmax=in,MAXIMUM \ VDEF:inavg=in,AVERAGE \ VDEF:infirst=in,FIRST \ VDEF:inlast=in,LAST \ VDEF:outmax=out,MAXIMUM \ VDEF:outavg=out,AVERAGE \ VDEF:outfirst=out,FIRST \ VDEF:outlast=out,LAST \ GPRINT:infirst:'%D %H\:%M to\g':strftime \ GPRINT:inlast:" %D %H\:%M\c":strftime \ COMMENT:"\s" \ AREA:in#32CD32:"Inbound\t" \ LINE:in#336600 \ GPRINT:inmax:"Max\: %5.1lf%S\t" \ GPRINT:inavg:"Average\: %5.1lf%S\t" \ GPRINT:inlast:"Current\: %5.1lf%S\l" \ AREA:out#4169E199:"Outbound\t" \ GPRINT:outmax:"Max\: %5.1lf%S\t" \ GPRINT:outavg:"Average\: %5.1lf%S\t" \ GPRINT:outlast:"Current\: %5.1lf%S\l" \ LINE:out#0033CC I tried removing the vertical-label statement and also leaving the width at the default, but the two GPRINT stfrtime elements remain off center, slightly to the left. Not sure if there is something I'm doing wrong here. Thomas Matthews On Fri, Feb 19, 2010 at 1:48 PM, Thomas Matthews <[email protected]> wrote: > Hi all, > > Apologize if this has been asked before, long time RRDTool user but > I've just subscribed to this list. > > I'm wondering if it is possible to center two GPRINT statements together? > > GPRINT:infirst:'%D %H\:%M to\g':strftime \ > GPRINT:inlast:" %D %H\:%M\c":strftime \ > > I would like the text "02/18/10 13:20 to 02/19/10 13:20" centered on > one line in the exact middle of the graph. Unfortunately, there is > extra white space on the right side of the text when I use the above > graphing statements. > > Is this problem a result of the two space characters that are inserted > between items? > > Regards, > > Thomas Matthews > _______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
