I use Plot to draw two figures and combine them in one figure with the following code.
C1 = Plot[{((3 t + 1/2)^2 (1 - 2 t 1/4))/(18 t) + 2 t^3 (1)^2 (1/4)^3}, {t, 1/6 (3 - Sqrt[3]), 2},
PlotTheme -> "Scientific", PlotRange -> Automatic, FrameLabel -> {{HoldForm[SubsuperscriptBox["\[Pi]", "i", "*"] // DisplayForm], None}, {HoldForm[t], None}},
LabelStyle -> {GrayLevel[0]}, PlotStyle -> {Red},
PlotLegends -> {"\!\(\*SubsuperscriptBox[\(\[Pi]\), \(A\), \(*\)]\) \under \!\(\*SubscriptBox[\(\[Alpha]\), \(A\)]\)=1"}]
D1 = Plot[{((3 t - 1/2)^2 (1 - 2 t (1/4)))/(18 t) + 2 t^3 (1)^2 (1/4)^3}, {t, (1/6) (3 - \[Sqrt]3), 2},
PlotTheme -> "Scientific", PlotRange -> Automatic, FrameLabel -> {{HoldForm[SubsuperscriptBox["\[Pi]", "i", "*"] // DisplayForm], None}, {HoldForm[t], None}}, PlotStyle -> {Dashed, Red},
PlotLegends -> {"\!\(\*SubsuperscriptBox[\(\[Pi]\), \(B\), \(*\)]\) \under \!\(\*SubscriptBox[\(\[Alpha]\), \(B\)]\)=1"}]
Show[C1, D1, PlotRange -> All]
However, the font styles of the plot legend are different as shown in the picture even if I used the same PlotLegends
in the code and I have tried LegendMaker
and autoLegend
to make the legend look nice but failed.
How can I adjust or rewrite the code to make the plot legends look the same or achieve the effect of
autoplot
putting the legends on the right-bottom side of the figure? Thanks in advance.
In addition, how can I put the plot legend in the rounded rectangle with a grey background-color as shown in the example picture below?