level 4
N瓶老白干
楼主
import导入excle数据后 用ListLinePlot绘图最后用show函数绘到一个坐标系下图显示不全的问题。代码如下:
A1 = ListLinePlot[Import["D:\\1.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Red]},
PlotLegends ->
Placed[LineLegend[{"1"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
A2 = ListLinePlot[Import["D:\\2.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Blue]},
PlotLegends ->
Placed[LineLegend[{"2"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
A3 = ListLinePlot[Import["D:\\3.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Green]},
PlotLegends ->
Placed[LineLegend[{"3"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
Show[A1, A2, A3, PlotRange -> {0, 25}, AxesLabel -> {"X", "Y"},
AxesStyle -> Directive[Arrowheads[0.025], Black, FontSize -> 30],
PlotLabel -> None,
LabelStyle -> {FontFamily -> "Times New Roman", GrayLevel[0]}]
得到的图为

2022年03月16日 10点03分
1
A1 = ListLinePlot[Import["D:\\1.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Red]},
PlotLegends ->
Placed[LineLegend[{"1"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
A2 = ListLinePlot[Import["D:\\2.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Blue]},
PlotLegends ->
Placed[LineLegend[{"2"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
A3 = ListLinePlot[Import["D:\\3.xlsx"],
PlotStyle -> {Directive[Thickness[0.0075], Green]},
PlotLegends ->
Placed[LineLegend[{"3"},
LabelStyle -> {{FontFamily -> "Times New Roman", GrayLevel[0]},
Black, 30}], Scaled[{0.69, 0.9}]]];
Show[A1, A2, A3, PlotRange -> {0, 25}, AxesLabel -> {"X", "Y"},
AxesStyle -> Directive[Arrowheads[0.025], Black, FontSize -> 30],
PlotLabel -> None,
LabelStyle -> {FontFamily -> "Times New Roman", GrayLevel[0]}]
得到的图为
