MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Math typesetting in plot labels

I recently read that Wolfram is working on integrating math typesetting into
Mathematica. I wonder if anything is currently available. A few examples of
what I need:

1. Plot[x/Sqrt[x-2],{x,2.001,10},
PlotLabel->OutputForm[SequenceForm["f(x) = ",

produces a plot label
                       f(x) = ------------
                              Sqrt[-2 + x]

This is unsatisfactory because the consumers of the graph are not Mathematica]
literate. They understand a radical symbol, but not Sqrt. Also, -2 + x causes
a brief bit of discomfort (they are used to x - 2).

2. Show[
Plot[2t^2 + t + 4,{t,-3.2,3.2},DisplayFunction->Identity,
Graphics[{Text[FontForm["s = 2t  + t + 4",
         {"Courier-Bold",14} ],{1.2,24}],
         {"Courier-Bold",12} ],{1.05,24.7}]}],
ListPlot[Table[{t,2t^2 + t + 4},{t,-3,3}],

There ought to be an easier way to do this. OutputForm fails for two reasons:
(A) the `s =' gets dropped
(B) the polynomial gets reversed in Mathematica's endearing manner:
        4 + t + 2t^2
    Again, the consumers of the graph are uncomfortable with ascending order.

Is there a better way to print these strings on a graph, or do we just wait
for Mathematica 3.0?


  • Prev by Date: ComplexRoots
  • Next by Date: Seeing variables outside of Packages.
  • Previous by thread: ComplexRoots
  • Next by thread: Math typesetting in plot labels