You could perhaps use the legendMaker
function I posted here (or a modified version of it). I use it with Overlay
instead of Show
. So you would do:
legendedPlot = Overlay[{plot, legendmaker[...]},Alignment->{...}]
Then you can export the result as
Export["file.pdf", legendedPlot]
Instead of exporting, the output of Overlay
can also be copied into other applications (even though the overlay box isn't an editable graphic by default). Just highlight the output graphic and do a usual copy operation.
Edit
Thanks to R.M. for the nice example plot, which I couldn't resist trying to label my way, too... so here I repeat R.M.'s definition first,
eqns = {Sin[3 Tanh[#]], Sin[Erf[#]]} &;
colors = {Blue, Red};
legends = TraditionalForm /@ eqns[x];
plot1 = Plot[Evaluate@eqns[x], {x, 0, Pi}, PlotStyle -> colors,
Filling -> {1 -> {{2}, LightGreen}}];
plot2 = ListPlot[
Select[RandomReal[{0, Pi}, {1000, 2}],
IntervalMemberQ[Interval[Sort[eqns[First@#]]], Last@#] &],
PlotStyle -> Darker@Green];
and now I label it to show the difference to the Legends
package:
Overlay[{Show[plot1, plot2],
legendMaker[legends, PlotStyle -> colors]}, Alignment -> {-.5, -.8}]