500*_*500 20 plot label wolfram-mathematica
如何分别标记每条线:
Plot[{{5 + 2 x}, {6 + x}}, {x, 0, 10}]
Run Code Online (Sandbox Code Playgroud)

Sim*_*mon 34
这里也有一些不错的代码,可以让你在动态做一个答案,以如何ListPlots注释多个数据集.
在图LabelPlot中的技术注释标记曲线中还定义了一个命令
当然,如果您没有太多的图像要做,那么在使用中手动添加标签并不困难Epilog,例如
fns[x_] := {5 + 2 x, 6 + x};
len := Length[fns[x]];
Plot[Evaluate[fns[x]], {x, 0, 10},
Epilog -> Table[Inset[
Framed[DisplayForm[fns[x][[i]]], RoundingRadius -> 5],
{5, fns[5][[i]]}, Background -> White], {i, len}]]
Run Code Online (Sandbox Code Playgroud)

事实上,你可以做类似的事情Locators,允许你在任何你想要的地方移动标签:
DynamicModule[{pos = Table[{1, fns[1][[i]]}, {i, len}]},
LocatorPane[Dynamic[pos], Plot[Evaluate[fns[x]], {x, 0, 10}],
Appearance -> Table[Framed[Text@TraditionalForm[fns[x][[i]]],
RoundingRadius -> 5, Background -> White], {i, len}]]]
Run Code Online (Sandbox Code Playgroud)
在上面我使定位器采用标签的形式,虽然也可以保持Epilog上面的类似,并具有控制位置的隐形定位器.定位器也可以被约束(使用第二个参数Dynamic)到适当的曲线......但这不是必需的.
作为上述代码的示例,其中包含手动移动标签的函数:
fns[x_] := {Log[x], Exp[x], Sin[x], Cos[x]};
Run Code Online (Sandbox Code Playgroud)

小智 10
Mathematica 9现在提供了简单的方法来包含传说.
Plot[{{5 + 2 x}, {6 + x}}, {x, 0, 10}, PlotLegends -> "Expressions"]
Run Code Online (Sandbox Code Playgroud)
您可以通过加载PlotLegends包在插图中插入图例
<<PlotLegends`;
Plot[{5+2 x,6+x},{x,0,10},
PlotLegend->{"5+2x","6+x"},LegendShadow->None,
LegendPosition->{0.3,-0.5},LegendSpacing->-0,LegendSize->0.5]
Run Code Online (Sandbox Code Playgroud)

但是,让我也注意到我不喜欢这个软件包,主要是因为它非常违反直觉,装载了太多的选项,并且不像大多数Mathematica的功能那样提供开箱即用的干净体验.你会有一些摆弄选项来获得你想要的东西.但是,在您想要传奇的图表和图表中,这可能很方便.另请参阅对此答案和此问题的评论.