def makefooter(lineno, footer=""):
    print "/prtstr {dup stringwidth pop exch gsave 7", posy(lineno), "2 add rmoveto show grestore ", 3 + colsize, " add 0 rmoveto currentpoint translate} def"
    print "/Times-Roman findfont ", colsize, " scalefont setfont gsave"
    print "5 0 moveto"
    print "(P values: ) prtstr "
    makeps(-1, lineno, [-99, pval0, 0, 0])
    print "(<", pval0, ") prtstr "
    makeps(-1, lineno, [-99, pval1, 0, 0])
    print "(<", pval1, ") prtstr "
    makeps(-1, lineno, [-99, pval2, 0, 0])
    print "(<", pval2, ") prtstr "
    makeps(-1, lineno, [-99, pval3, 0, 0])
    print "(<", pval3, ") prtstr "
    makeps(-1, lineno, [-99, pval4, 0, 0])
    print "(<", pval4, ") prtstr "
    makeps(-1, lineno, [-99, pval5, 0, 0])
    print "(<", pval5, ") prtstr "
    print "grestore"
    # fold change
    print "gsave 0 ", -colsize, "translate"
    print "5 0 moveto"
    print "(Fold change:) prtstr "
    makeps(-1, lineno, [300, pval0, 0, 0])
    print "(>+4) prtstr"
    makeps(-1, lineno, [200, pval0, 0, 0])
    print "(+3) prtstr"
    makeps(-1, lineno, [100, pval0, 0, 0])
    print "(+2) prtstr"
    makeps(-1, lineno, [50, pval0, 0, 0])
    print ("(+1.5) prtstr")
    makeps(-1, lineno, [-33, pval0, 0, 0])
    print ("(-1.5) prtstr")
    makeps(-1, lineno, [-50, pval0, 0, 0])
    print "(-2) prtstr"
    makeps(-1, lineno, [-66, pval0, 0, 0])
    print "(-3) prtstr"
    makeps(-1, lineno, [-75, pval0, 0, 0])
    print "(<-4) prtstr"
    print "grestore"
    if footer:
        print "gsave ", 0, posy(lineno + 3), (footer) % "moveto ( %s ) show grestore"
dataset/ETHPy150Open CGATOxford/cgat/scripts/go2plot.py/makefooter/swapped operands of `%`