示例 2 步,在同一个会话中按顺序运行。每一步都在引擎上执行过,下面的输出就是它实际产生的。
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]})};无输出——这一步是在为下一步做准备。
Plot[{Sin[x], Cos[x], Tan[x]}, {x, 0, 2π}, ImageSize -> 400, PlotLegends -> LineLegend["Expressions", LabelStyle -> {Gray, Bold, 18}], Evaluate@styleoptions]-Graphics-全部操作示例 · 函数参考 · 从 MCP 客户端使用