level 5
我用show命令画了三条曲线,并且给三条曲线标注了图例。但是发现两个问题:(1)图例之间的间距过大,请问用什么代码可以调整图例之间的间隔?(2)给图例设置字体大小的时候,发现对上标不起作用。比如 y^AB [x] 中 y 和 x 都变成了10号字体,但是上标 AB 的大小却没有改变,请问如何调整上标的字体大小?
我写的代码如下:
Show[Plot[{2^x + 1}, {x, 1, 3}, PlotLegends -> LineLegend[{TraditionalForm[(y^AB)[x]]}, LabelStyle -> 10],
PlotStyle -> Red], Plot[{x + 3}, {x, 1/2, 3}, PlotLegends -> LineLegend[{TraditionalForm[(y^CD)[x]]}, LabelStyle -> 10], PlotStyle -> Blue], Plot[{2 x^2}, {x, 0, 2}, PlotLegends -> LineLegend[{TraditionalForm[(y^EF)[x]]}, LabelStyle -> 10], PlotStyle -> Black], PlotRange -> All, AxesLabel -> {x, y}, AxesOrigin -> {0, 0}]
运行结果如下图:

请高手帮忙看看,谢谢啦!另外我之前的账号(@超级city)不知道咋回事最近天发帖发不出去
,没办法只能注册了这个新号来问了
2022年11月19日 17点11分
1
我写的代码如下:
Show[Plot[{2^x + 1}, {x, 1, 3}, PlotLegends -> LineLegend[{TraditionalForm[(y^AB)[x]]}, LabelStyle -> 10],
PlotStyle -> Red], Plot[{x + 3}, {x, 1/2, 3}, PlotLegends -> LineLegend[{TraditionalForm[(y^CD)[x]]}, LabelStyle -> 10], PlotStyle -> Blue], Plot[{2 x^2}, {x, 0, 2}, PlotLegends -> LineLegend[{TraditionalForm[(y^EF)[x]]}, LabelStyle -> 10], PlotStyle -> Black], PlotRange -> All, AxesLabel -> {x, y}, AxesOrigin -> {0, 0}]
运行结果如下图:

请高手帮忙看看,谢谢啦!另外我之前的账号(@超级city)不知道咋回事最近天发帖发不出去





