Qurak

Legend curves with their associated expressions

示例 2 步,在同一个会话中按顺序运行。每一步都在引擎上执行过,下面的输出就是它实际产生的。

第 1 步
styleoptions = Sequence@@{BaseStyle -> {GrayLevel[0.5], AbsoluteThickness[1.5]}, Filling -> Axis, FillingStyle -> {1 -> Opacity[0.6, Hue[0.63, 0.5, 0.7]], 2 -> Opacity[0.6, Hue[0.25, 1, 0.6]], 3 -> Opacity[0.6, Hue[0.11, 0.75, 0.9]]}, PlotStyle -> (Directive[AbsoluteThickness[5], #]& /@ {Hue[0.63, 0.5, 0.7], Hue[0.25, 1, 0.6], Hue[0.11, 0.75, 0.9]})};

无输出——这一步是在为下一步做准备。

第 2 步
Plot[{Sin[x], Cos[x], Tan[x]}, {x, 0, 2π}, ImageSize -> 400, PlotLegends -> LineLegend["Expressions", LabelStyle -> {Gray, Bold, 18}], Evaluate@styleoptions]
输出
-Graphics-

用到的函数

相关操作示例

全部操作示例 · 函数参考 · 从 MCP 客户端使用