Hi,
I'd advise to use 'raw strings' like:
ylab = r'$RRR [\frac{R(300K)}{R(10K)}]$'
If you then type 'ylab' in interative mode, you'll see:
'$RRR [\\frac{R(300K)}{R(10K)}]$'
Voila: Backslashes get escaped automatically.
Cheers
Christian
On Tuesday 04 April 2006 17:24, manouchk wrote:
> Hi,
>
> My little problem is simple. I want to use a variable to define labels on a
> graph. If I want to create a fraction, I have to use function \frac but
> when I do that :
> ylab="$RRR [\frac{R(300K)}{R(10K)}]$"
> The value stored in ylab is :
> '$RRR [\x0crac{R(300K)}{R(10K)}]$'
>
> So how to put "\f" in a variable in python?
>
>
|