I want to add legend to Show. I tried as below by the help of how to add plotlegends in a show function:

Show[des = PolarPlot[2 Sin[2 t], {t, 0, 2 Pi}, PlotStyle -> {Gray, Dashed}],
Epilog -> Inset[Framed[Column[{PointLegend[{Lighter[Yellow]}, {"Data"}],
LineLegend[{Darker[Blue]},
{"f(x)=\!$$\*SuperscriptBox[\(x\[ExponentialE]$$, \$$-x$$]\)"}]}],


But the legend comes in the graph. I failed to put it out of the graph. Could anyone help?

In such cases, you can treat them as separate objects and combine with Grid

Grid[{{PolarPlot[2 Sin[2 t], {t, 0, 2 Pi}, PlotStyle -> {Gray, Dashed}],
Framed[Column[{PointLegend[{Lighter[Yellow]}, {"Data"}],
LineLegend[{Darker[Blue]}, {"f(x)=x e^x"}]}], RoundingRadius -> 5]}}]


Eplog does not allow you to rescale the image, so here I do it before with PlotRangePadding

    Show[des =
PolarPlot[2 Sin[2 t], {t, 0, 2 Pi}, PlotStyle -> {Gray, Dashed},
Epilog ->
Inset[Framed[
Column[{PointLegend[{Lighter[Yellow]}, {"Data"}],
LineLegend[{Darker[
Blue]}, {"f)=\!$$\*SuperscriptBox[\(x\[ExponentialE]$$, \
\$$-x$$]\)"}]}], RoundingRadius -> 5], Scaled[{0.72, 0.8}]]]


out =

• I think you do not want it to say "f(x)=\!(*SuperscriptBox[(x[ExponentialE]), \(-x)])" right? did you copy it right? there is also an extra opening curly bracket in your code (or one closing to few) – Ruud3.1415 Jul 19 '17 at 17:30
PolarPlot[2 Sin[2 t], {t, 0, 2 Pi},
PlotStyle -> {Gray, Dashed},
PlotLegends ->
LineLegend[{Dashed, Gray},