# How to add Plot legend to the show in a certain place?

I am plotting two sets of data, when I put legend in each separate graph, then use show, it give me the combined graph with the legend on the right of the graph. After that, when I export the graph in any format it does not show the legend. Could any one help me on how to show the legend in the upper right corner of the graph generated from the show command, and to make it appear in the exported graphic. Best regards

• Welcome to Mma.SE. Thanks for taking the tour. Be sure you have learned about asking and what's on-topic. Always edit if improvable, show due diligence, give brief context, include minimal working example of code and data in formatted form. Without code you leave us guessing the details that may be crucial to understand the problem. Please edit your question to improve it. By doing all this you help us to help you and likely you will inspire great answers. Jul 29, 2018 at 11:49
• @rhermans. Thank you for taking the time to read my question. I think I give all the needed input to my question, the code and the generated graph is in the attached picture. please let me know if more is needed, so I can provide gladly. Best regards
– user59148
Jul 29, 2018 at 12:02
• Please edit your question to clarify whether "show the legend in the upper right corner of the graph" means inside or outside of the Frame. Jul 29, 2018 at 14:24
• Based on your problem with exporting the graphics, you may be looking for How can I save both the plot and the legend together? Jul 30, 2018 at 2:10

pos = Placed[#, Scaled@{0.9, 0.75}] &;
a = ListPlot[Table[Sin[x], {x, 0, 2 \[Pi], \[Pi]/18}], Frame -> True,
PlotMarkers -> {Style["+", Blue], 14}, PlotLegends -> pos@{"a"}];
b = ListPlot[Table[Sin[x], {x, 0, 2 \[Pi], \[Pi]/18}], Frame -> True,
PlotMarkers -> {Style["O", Red], 10}, PlotLegends -> pos@{"a"}];
Show[a, b]


The {0.9,0.75} in Placed are coordinates of the legend in relative units