Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a newbie at Mathematica and I couldn't find how to label the maximum and the zero of a simple function in Plot with their names:

rho[r_] = 1 - r^2;
Plot[rho[r], {r, -1, 1}, AxesLabel -> {r, \[Rho]}] 

and i want to show the maximum on the plot with

Subscript[\[Rho], c]

and the point rho[1] with

Subscript[R, TF]
share|improve this question
Look up Text[] or Inset[]. – J. M. Apr 3 '13 at 16:15
up vote 5 down vote accepted

How about:

 rho[r_] = 1 - r^2;
 pl = Plot[rho[r], {r, -1, 1}, AxesLabel -> {r, \[Rho]}];


Show[{pl, Graphics[Text[Subscript[\[Rho], c], {0.05, 1.05}]],
Graphics[Text[Subscript[R, TF], {1.05, 0.05}]]}, PlotRange -> All]

Mathematica graphics

share|improve this answer
Thanks for this clear answer! – cherzieandkressy Apr 3 '13 at 18:36

Using my answer to this question, you can generate any of the following interactively:

Mathematica graphics

The only change needed is to remove the "String" in




to be able to type expressions.

The interactive interface looks like this:

Mathematica graphics

share|improve this answer

You can put Text and Point on a plot with Epilog.

Plot[rho[r - Pi], {r, 1, 5},
 AxesLabel -> {r, \[Rho]},
 Epilog -> {
   PointSize[.01], Red, Point[zero],
   Black, Point[max], Map[Text[#[[1]], #[[2]], {0, -2}] &,
    Transpose[{{-Subscript["R", "TF"],
       Subscript["R", "TF"], Subscript["\[Rho]", "c"]},
      Join[zero, {max}]}]]},
 PlotRange -> All,
 PlotRangePadding -> .5]


Calculated maximum and zeroes:

max = {r /. Last@#, First@#} &[FindMaximum[rho[r - Pi], r]]
{3.14159, 1.}

zero = {r, 0} /. NSolve[rho[r - Pi] == 0, r]
{{2.14159, 0}, {4.14159, 0}}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.