MathGroup Archive 1992

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

Search the Archive

Math typesetting in plot labels

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Math typesetting in plot labels
  • From: Gossett <gossett at bethel.edu>
  • Date: Thu, 19 Nov 1992 08:48:05 -0600

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) = ",
     x/Sqrt[x-2]]],
AxesLabel->{"x","f(x)"},
PlotRange->{{0,10},{-1,8}}]

produces a plot label
                                   x
                       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,
AxesLabel->{"T","S"}],
Graphics[{Text[FontForm["s = 2t  + t + 4",
         {"Courier-Bold",14} ],{1.2,24}],
    Text[FontForm["2",
         {"Courier-Bold",12} ],{1.05,24.7}]}],
ListPlot[Table[{t,2t^2 + t + 4},{t,-3,3}],
PlotJoined->False,PlotStyle->PointSize[.014]
,DisplayFunction->Identity],
DisplayFunction->$DisplayFunction]

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