No idea, but I observed also similar problems.

The first idea was that this is problem from mathplotlib, but I
followed the example at http://www.scipy.org/Cookbook/Matplotlib/UsingTex
and tried the following

P=plot(x^2,(x,-3,3))
T=text(r"$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$",(0,0),
fontsize=16)
show(P+T)

this does not work because of displaystyle. Removing \displaystyle and
trying

P=plot(x^2,(x,-3,3))
T=text(r"$\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$",(0,0), fontsize=16)
show(P+T)

This gives a fraction which has far worse rendering than the rendering
via LaTeX and rendering which can be seen at 
http://www.scipy.org/Cookbook/Matplotlib/UsingTex

Tested now at sagenb.org

Robert



On 13 pro, 03:56, Greg Marks <gtma...@gmail.com> wrote:
> When I include LaTeX using the text() command in a 2-D
> plot, the size of the text is not quite what I'd like.
> For example, on p. 3 of the document here:
>
>  http://gmarks.co.cc/math_142-02_fall_2009_exam_3_solutions.pdf
>
> the sizes of the fractions in the SAGE plot are quite
> different from the sizes LaTeX produces in the document
> itself (e.g. right above the plot).  The commands used in
> the plot were:
>
>  t1=text("$y=\\frac{1}{1+x^2}$", (2.2, 0.5),
>  rgbcolor='black', fontsize=18)
>  t2=text("$y=x^2\!+\\frac{5}{12}$", (-2.1, 1.8),
>  rgbcolor='black', fontsize=18)
>
> (I note also the strange need for \! for correct spacing
> in t2.)  I tried inserting \displaystyle and \\displaystyle
> in the fractions in t1 and t2, but got error messages.
>
> There is, of course, the obvious solution of creating
> a separate text element for the numerator, denominator,
> and line of the fraction, as well as the left-hand side
> of the equation $y = \frac{1}{\displaystyle 1 + x^2}$,
> and then tinkering with the sizes and alignment, but this
> seems extremely tedious.
>
> I admit this is a pretty minor issue, but I'd like to be
> able to fix it.
>
> Sincerely,
> Greg
>
>     ------------------------------------------------
>    | Greg Marks                                     |
>    | Department of Mathematics and Computer Science |
>    | St. Louis University                           |
>    | St. Louis, MO 63103-2007                       |
>    | U.S.A.                                         |
>    |                                                |
>    | Phone: (314)977-7206                           |
>    | Fax: (314)977-1452                             |
>    | Web:http://math.slu.edu/~marks               |
>     ------------------------------------------------

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to