作业帮 > 数学 > 作业

关于Mathematica画图标注图例的问题

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:数学作业 时间:2024/04/24 06:06:11
关于Mathematica画图标注图例的问题
如下程序:
Plot[Table[g1^2*5 r + r,{g1,1,3,1}],{r,0,20}]
在一张图里画出了不同的几条线,每条线对应一个g1的值,这个在图中能标注出来吗?
关于Mathematica画图标注图例的问题
Plot[Evaluate@Table[g1^2*5 r + r, {g1, 1, 3, 1}], {r, 0, 20},
Prolog -> {{Style[Text["Line-1", {15, 600}], 16, Gray]}, {Style[
Text["Line-2", {15, 350}], 16, Red]}, {Style[
Text["Line-1", {15, 150}], 16, Blue]}},
Epilog -> {Line[{{.5, 800}, {2, 800}}],
Style[Text["Line-1", {3, 800}], Gray], Line[{{.5, 700}, {2, 700}}],
Line[{{.5, 600}, {2, 600}}], Style[Text["Line-2", {3, 700}], Red],
Style[Text["Line-3", {3, 600}], Blue]}]