# How to put a point created by Epilog in a Legend?

I want to put a point in the legend, which is the easiest way?

My code is:

Plot[x^2, {x, 0, 2},
Epilog -> {Directive[Red, PointSize[Large]], Point[{1, 1}]},
PlotLegends -> {"x^2"}]


This gives me the legend of the parabola but if I add another entry it does not print the point in the legend. What should I add?

• Legended[Plot[x^2, {x, 0, 2}, Epilog -> {Directive[Red, PointSize[Large]], Point[{1, 1}]}, PlotLegends -> {"x^2"}], PointLegend[{Red}, {{1, 1}}]] Nov 7, 2022 at 20:08
• Are you wanting one legend entry that is a blue line with a red dot in it or are you wanting two legend entries, one that is a blue line and one that is a red dot? Nov 7, 2022 at 21:21
• I want two items in the legend, a blue line and a dot. So 2 legend entries. I triesd @BobHanlon suggestion and it works but if you have a bit of text the point is not placed in the mid of the blue line in the legend. I would like to have a result like in Matlab where everything is aligned Nov 7, 2022 at 21:40

plot1 = Plot[x^2, {x, 0, 2}, PlotLegends -> {"x^2"}];
plot2 = ListPlot[{{1, 1}}, PlotStyle -> Red,
PlotLegends -> {"A Red Dot"}];
Show[plot1, plot2] Epilog puts graphics primitives after the plot is drawn. The legend has to be put together manually.

Plot[x^2, {x, 0, 2}
, Frame -> True
, ImageSize -> 400
, Epilog -> {AbsolutePointSize, Red, Point@{1, 1}},
PlotLegends -> Placed[LineLegend[{Blue, Blue}
, {"\!$$\*SuperscriptBox[\(x$$, $$2$$]\)", "Red dot"}
, LegendLayout -> {"Column", 1}
(*,LegendFunction\[Rule](Framed[#
,Background\[Rule]GrayLevel[0.9] 