1

Manual shows renaming of one equation in Tooltip. If you have multiple equations in a single plot, how can I rename each equation?? Having Tooltip display lengthy equations if of little value, therefore a better nomenclature is needed, but it appears Mathematica will only allow one renaming???

equation only

renaming applies same nomenclature to all lines

ray
  • 47
  • 3

1 Answers1

1
funcs = Hypergeometric2F1[2., 3., 4., #] & /@
   {x, x^2, Sin[x], Cos[x]};

Plot[
 Evaluate[Tooltip[#, #[[-1]]] & /@ funcs],
 {x, -2, 2},
 PlotLegends -> Placed[(Last /@ funcs), {.85, .35}],
 PlotRange -> {0, 20},
 PlotLabel -> Hypergeometric2F1[2., 3., 4., f[x]]]

enter image description here

Or

labels = {x, x^2, Sin[x], Cos[x]};

Plot[Evaluate[(Tooltip @@ #) & /@ Transpose[{funcs, labels}]],
 {x, -2, 2},
 PlotLegends -> Placed[labels, {.85, .35}],
 PlotRange -> {0, 20},
 PlotLabel -> Hypergeometric2F1[2., 3., 4., f[x]]]
Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198