       RE: how-to show a contourplot together with a point grid

• To: mathgroup at smc.vnet.net
• Subject: [mg72055] RE: [mg72006] how-to show a contourplot together with a point grid
• From: "David Annetts" <davidannetts at aapt.net.au>
• Date: Sun, 10 Dec 2006 04:49:02 -0500 (EST)

```Hi,

>     i have a matix of dimension {m,n} and make a
> listcontourplot out of it. and i have another matrix of the
> same dimension and make a plot by
> : Show[Map[Point,grid]].
>    i want to overlap these two plots together. And I have
> tried using the second one as the Epilog of the first one,
> but it did not work. any ideas?
>    generally, how can i overlap two plots in one figure?

It is very difficult to give specific help since you heven't given a
specific example.  In future, I suggest you post the code that you are
having problems with.

Generate some data, then plot it

data = Table[Sin[x y], {x, -Pi, Pi, Pi/10}, {y, -Pi, Pi, Pi/10}];
cplt = ListContourPlot[data, ColorFunction -> Rainbow, MeshRange ->
{{-Pi, Pi}, {-Pi, Pi}},
FrameTicks -> {PiScale, PiScale, None, None}];

For the colour function, I define

Rainbow[z_] := Hue[.8 z];

You will also need to load Graphics`Graphics for PiScale to work.

Next, generate the points and plot them

pnts = Table[{x, y}, {x, -Pi, Pi, Pi/10}, {y, -Pi, Pi, Pi/10}];
pplt = Show[Graphics[Point[#] & /@ Partition[Flatten[pnts], 2]]];

Finally, display the two plots

Show[cplt, pplt];

Show[] is usually how you'd display two (or more) plots together.

Regards,

Dave.

```

• Prev by Date: Re: Simplification with constraints
• Next by Date: RE: SphericalPlot3D
• Previous by thread: Re: how-to show a contourplot together with a point grid
• Next by thread: Style Sheet Question