如何在mathematica中自动生成函数名?

sam*_*sam 6 wolfram-mathematica

当我绘制exp,2 ^ x,3 ^ x等多个函数时,是否可以生成每个函数的标签?

我的代码现在:

  Plot[{Exp[x], 2^x, 3^x}, {x, -5, 2}, AspectRatio -> Automatic, PlotStyle -> {Red, Green, Blue}]
Run Code Online (Sandbox Code Playgroud)

我的意思是在这种情况下生成3个标签,告诉用户它是什么功能.

如:

在此输入图像描述

你是如何产生的?

Arn*_*ing 4

也许这有效:使用TooltipinPlot生成Graphics带有工具提示的对象。然后重写工具提示,将所需的文本放置在所需的位置:

Plot[
 Tooltip@{Exp[x], 2^x, 3^x}, {x, -5, 2},
 AspectRatio -> Automatic,
 PlotStyle -> {Red, Green, Blue},
 PlotRange -> All,
 PlotRangePadding -> 1.1] /.
{
 Tooltip[{_, color_, line_}, tip_]
 :>
 {Text[Style[tip, 14], {.25, 0} + line[[1, -1]]], color, line}
}
Run Code Online (Sandbox Code Playgroud)

数学图形