Hi,
I have different questions to use tex with matplotlib.
The first one:
If I'm doing:
rc('text', usetex=True)
xlabel('$\textrm{toto}$') # bad
xlabel(r'$\textrm{toto}$') # ok
The results are not the same and I don't understand why.
and for:
xlabel('$\textit{toto}$') #bad
Gerardo,
I think the approach used in this code should do what you want. Dorry I
don't have time for more explanation...
-Chris
Gerardo Rivera wrote:
Hi,
I'm trying to draw a line given an angle, magnitude, x0 and y0
location on a 2d line plot. I use the cosine and sine to find
the x1
[EMAIL PROTECTED] wrote:
Hi,
I have different questions to use tex with matplotlib.
The first one:
If I'm doing:
rc('text', usetex=True)
xlabel('$\textrm{toto}$') # bad
xlabel(r'$\textrm{toto}$') # ok
The results are not the same and I don't understand why.
and for:
[EMAIL PROTECTED] wrote:
I tried:
label='$\textrm{test}_2$
xlabel(r label)
xlabel(r+label)
etc but it not working (like I expected). So I would like to know if there
are
a way to precise that the text is a raw string by another thing that the r
character just before the string.