I'm plotting graphs with Perl using RRDs/RRDtool. I'm able to generate a graph with a legend, but I'm struggling to align the fields in the legend.
The code I'm using is:
"COMMENT:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\\n",
"COMMENT:\t\t\t\t\t\t\tMinimum\t\t\tMaximum\t\t\tAverage\t\t\t\tCurrent\\n",
"COMMENT:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\\n",
"LINE2:e2gran#DF01D7:\t2GRAN\t\t\t\t",
"GPRINT:e2gmin:\t%6.3lf %s\t\t",
"GPRINT:e2gmax:\t%6.3lf %s\t\t",
"GPRINT:e2gaver:\t%6.3lf %s\t\t",
"GPRINT:e2glast:\t%6.3lf %s\\n",
"LINE2:e3gran#0000FF:\t3GRAN\t\t\t\t",
"GPRINT:e3gmin:\t%6.3lf %s\t\t",
"GPRINT:e3gmax:\t%6.3lf %s\t\t",
"GPRINT:e3gaver:\t%6.3lf %s\t\t",
"GPRINT:e3glast:\t%6.3lf %s\\n",
"LINE2:e4gran#FF8000:\t4GRAN\t\t\t\t",
"GPRINT:e4gmin:\t%6.3lf %s\t\t",
"GPRINT:e4gmax:\t%6.3lf %s\t\t",
"GPRINT:e4gaver:\t%6.3lf %s\t\t",
"GPRINT:e4glast:\t%6.3lf %s\\n",
"LINE2:e2gtran#FFFF00:\t2GTRAN\t\t\t",
"GPRINT:e2gtmin:\t%6.3lf %s\t\t",
"GPRINT:e2gtmax:\t%6.3lf %s\t\t",
"GPRINT:e2gtaver:\t%6.3lf %s\t\t",
"GPRINT:e2gtlast:\t%6.3lf %s\\n",
"LINE2:allregmax#FF0000:\tALL_REGIONS\t\t",
"GPRINT:allmin:%6.3lf%s\t\t",
"GPRINT:allmax:%6.3lf%s\t\t",
"GPRINT:allaver:%6.3lf%s\t\t",
"GPRINT:alllast:%6.3lf%s\\n",
"LINE3:wrongdata#000000:\\tINCOMPLETE DATA\\n",
The font used for the legend is Arial. The output looks like this:
While I'm aiming for something like this:
I have tried TEXTALIGN
, fiddling with spaces and tabs, and checked the RRDtool docs and different tutorials, but I just can't figure this out.