[rrd-users] Re: RRDTool:OO question

William Yardley rrd-users at veggiechinese.net
Sun Apr 30 04:00:45 MEST 2006

On Sun, Apr 30, 2006 at 03:23:23AM +0200, Alex van den Bogaerdt wrote:
> On Sat, Apr 29, 2006 at 11:39:33AM -0700, William Yardley wrote:
> > If I insert a literal space into a certain string, it seems to screw
> > up the overall spacing, even though I have tabs after it. However,
> > if I try
> I'm not sure if tabs are supposed/guarantied to work.

 From TFM:

   If you are using the proportional font in your graph, you
   can use tab characters or the sequence \t to line-up
   legend elements. Note that the tabs inserted are relative
   to the start of the current legend element!

I guess the second part of this is the part that might cause problems.

> > If I put in a comment with a single space, RRDTool seems to put in
> > more than one space.  Is there an easy way to embed a single space?
> > And shouldn't I not have to worry about the single space since I'm
> > using tabs?

> Try without tabs, using only spaces to line up your legend.

I don't think that's going to work - assuming tabs work as documented,
that should do a lot better job at dealing with situations where there
are differing number of characters in the strings....
for example:

     * Max1: 11.56      * Ave1: 5.81
     * Max2: 6.43      * Ave2: 4.51

If I'm reading the docs right, using tabs should make this line up fine,
but I think using spaces would mean they'd be off by one.

> > but \g strips out any whitespace at all. So is there a way to supress
> > those extra spaces without also ignoring all whitespace within a string?
> Does it really?  I think \g works from right to left and stops as soon
> as it does not find spaces anymore?  This would mean spaces within a
> string should survive.  Can you create an example?

Sorry - I didn't read quite far enough... "The \g also ignores any space
inside the string if it is at the very end of the string." (I only read
the first part of that). However, the
end is where I wanted to put it. I get the same result from having the
legend be: 

'Combined Ave\: \g',
'Combined Ave\:\g',


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