RE: More Epilogs

• To: mathgroup at smc.vnet.net
• Subject: [mg23688] RE: [mg23654] More Epilogs
• From: "David Park" <djmp at earthlink.net>
• Date: Mon, 29 May 2000 12:24:17 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

> From: F. Mittermayr [mailto:mitterma at linz.vai.co.at]
To: mathgroup at smc.vnet.net
> Hi,
> does anyone know how to combine 2 plots with 2 epilogs in a Show command??
>
>
> p1=Plot[Sin[x], {x,0,2 Pi}, Epilog->
> {PointSize[0.05],Hue[1],Point[{0,1}]},
> DisplayFunction->Identity];
> p2=Plot[Cos[x], {x,0,2 Pi}, Epilog->
> {PointSize[0.05],Hue[1],Point[{0,0}]},
> DisplayFunction->Identity];
> Show[p1,p2,DisplayFunction->\$DisplayFunction]
>
> unfortunately only one Epilog is plotted.
>
> Thnx for any ideas
> F. Mittermayr
>

You have to put all the Epilog commands in the first plot.

I apologize for always bringing up DrawingPaper, but this is exactly the
kind of problem it is designed to overcome. It is much more natural just to
draw each element that you want, in the order that you want. DrawingPaper
puts the curves drawn by the various plot commands on the same level as
Graphics primitives. So the above plot could be done by:

Needs["Graphics`DrawingPaper`"]
Show[Graphics[
{Draw[Sin[x], {x, 0, 2Pi}],
Draw[Cos[x], {x, 0, 2Pi}],
Hue[1], PointSize[0.05], Point[{0, 1}], Point[{0, 0}]}],
Axes -> True];

And it is not necessary to turn the DisplayFunction off and on.

David Park