这个图如何导出呢?求助!!!(感谢上次那位提供代码的大佬
mathematica吧
全部回复
仅看楼主
level 2
热勇www♬ 楼主
shadowbox[legend_] := Module[{w, h, dx}, dx = 0.02;
{w, h} = ImageDimensions@Rasterize[legend];
Graphics[{{Gray,
Rectangle[{dx, -dx}, {1 + dx, 1/w*h - dx}]}, {White,
EdgeForm[Gray], Rectangle[{0, 0}, {1, 1/w*h}]},
Inset[legend, {0.5, 1/w*h/2}, Center]}]]
ListLinePlot[
Table[Table[{x, f[x]}, {x, 0, 1, 0.05}], {f, {
# + Sin[2 \[Pi] #
]/3 &,
Sqrt[
#] + Sin[3 \[Pi] #
]/5 &, # &, # + Sin[\[Pi] #]/4 &}}],
InterpolationOrder -> 3, PlotMarkers -> "OpenMarkers",
PlotLegends ->
Placed[LineLegend[Automatic,
Table[StringTemplate["\[Alpha]=``"][\[Alpha]], {\[Alpha], {0.5,
0.7, 0.9, 1.1}}], LegendFunction -> shadowbox,
LegendLayout -> (Grid[Map[Row, Partition[#, 2], {2}]] &),
LegendMarkerSize -> {{40, 15}}], {0.7, 0.2}],
PlotTheme -> "Detailed"]
2022年04月15日 08点04分 1
level 2
热勇www♬ 楼主
这个导出命令无法顺利导出[泪]
2022年04月15日 08点04分 2
什么叫无法顺利导出?怎么判断的?
2022年04月15日 10点04分
你那个路径里混用两种斜杠可能出问题吧
2022年04月15日 10点04分
吧务
level 12
"fig6 = "的位置错了,应该放在ListLinePlot前面才对,你这样写fig6是Null
2022年04月15日 11点04分 3
感谢!!![玫瑰]
2022年04月15日 12点04分
好家伙,我也跟着眼瞎了
2022年04月16日 05点04分
level 2
热勇www♬ 楼主
ListLinePlot[
Table[Table[{x, f[x]}, {x, 1, 7.5,
1}], {f, {(245/12) + ((100
#)/9) &, (15 - 10 #
) +
12005/1200 + (4900 #)/(900) &, 10 &}}], InterpolationOrder -> 3,
PlotMarkers -> "OpenMarkers",
LabelStyle -> {FontFamily -> "Times New Roman", 12}, Frame -> True,
FrameTicks -> {{None, None}, {All, None}},
TicksStyle -> Directive[Black, FontFamily -> "CMU Serif", 12],
AxesStyle -> Black,
FrameLabel -> {Style["\[Theta]\[LongRightArrow]", 10.5,
FontFamily -> "宋体", Black],
Style["\!\(\*SuperscriptBox[\(P\), \(\\\ \)]\)\[LongRightArrow]",
12, FontFamily -> "宋体", Black]},
PlotLegends ->
Placed[LineLegend[{Style["A", FontFamily -> "Times New Roman", 10.5,
Italic], Style["\!\(\*FormBox[\(B\),
TraditionalForm]\)", FontFamily -> "Times New Roman", 10.5, Italic],
Style["C", FontFamily -> "Times New Roman", Italic]},
LegendFunction -> (Framed[#, RoundingRadius -> 3,
FrameMargins -> 2, FrameStyle -> Gray] &)], Bottom]]
@无影东瓜
2022年04月17日 02点04分 5
level 2
热勇www♬ 楼主
2022年04月17日 02点04分 6
1