怎样调节图例间的距离
mathematica吧
全部回复
仅看楼主
level 6
冉qx 楼主
ListLinePlot[{Table[{x, Sin[x]}, {x, 0.2, 0.4, 0.001}],
Table[{x, Cos[x]}, {x, 0.2, 0.4, 0.001}]},
PlotLegends -> Placed[LineLegend[{"\!\(\*SubscriptBox[
StyleBox[\"n\",\nFontSlant->\"Italic\"], \(1\)]\)",
"\!\(\*SubscriptBox[
StyleBox[\"n\",\nFontSlant->\"Italic\"], \(2\)]\)"},
LegendFunction -> (Framed[#, RoundingRadius -> 3] &),
LegendMargins -> -1], Scaled[{0.88, 0.75}]], Frame -> True,
GridLines -> Automatic]
如图所示,有什么办法让图中红线所指位置,两个图例之间的空白减小一些吗?
2021年08月18日 02点08分 1
level 6
冉qx 楼主
我翻遍了帮助文档也没发现解决办法,有人知道吗?谢谢!
2021年08月19日 10点08分 2
吧务
level 15
…… *Legend 有个隐藏选项"Spacings",此外,虽然文档写的比较简略所以粗读的时候比较难意识到,但 LegendLayout 也可以用来调,参看SE帖子《Show and PlotLegend row spacing》(编号116116)和《Make Plot Legend Wider》(编号139379)
2021年09月04日 00点09分 3
试试看链接贴不贴得出来:mathematica.stackexchange.com/a/116120/1871 mathematica.stackexchange.com/a/139381/1871
2021年09月04日 00点09分
1