From: Juergen H. <jh...@gw...> - 2006-03-22 19:14:08
|
Dear, All, I am using matplotlib's rc to label x axes: rc('text', usetex=True) pl.xlabel(r'\textbf{Residue}') I would like to use something more dynamic like: la='5';pl.xlabel(r'\textbf{Residue }%s',fontsize=18) %la But i get: TypeError: unsupported operand type(s) for %: 'instance' and 'str' if la is float and int the error is reported accordingly.. How would be the best way to go about it? with eval I was aiming at resolving the problem but so far I failed... best regards Juergen |