Re: Show a maximum curve in ListContourPlot

• To: mathgroup at smc.vnet.net
• Subject: [mg108981] Re: Show a maximum curve in ListContourPlot
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 9 Apr 2010 03:31:23 -0400 (EDT)

```The extraneous equal signs got put in sometime after the e-mail left my mailbox. My sent copy is good and executes fine.

data = Table[{
x = RandomReal[{-2, 2}],
y = RandomReal[{-2, 2}],
Sin[x y]},
{1000}];

Show[ListContourPlot[data],
ContourPlot[x y == Pi/2,
{x, -2, 2}, {y, -2, 2},
ContourStyle -> Directive[Red, Thick]]]

Show[ListContourPlot[data],
ParametricPlot[{x, Pi/2/x}, {x, -2, 2},
PlotStyle -> Directive[Red, Thick],
Exclusions -> 0]]

If correcting the set and equal signs didn't work, perhaps you used a version prior to 6. Directive was new in 6.

Bob Hanlon

---- Virgil Stokes <vs at it.uu.se> wrote:

=============
On 08-Apr-2010 13:59, Bob Hanlon wrote:
> data == Table[{
>      x == RandomReal[{-2, 2}],
>      y == RandomReal[{-2, 2}],
>      Sin[x y]}, {1000}];
>
> Show[
>   ListContourPlot[data],
>   ContourPlot[x y ==== Pi/2,
>    {x, -2, 2}, {y, -2, 2},
>    ContourStyle ->  Directive[Red, Thick]]]
>
> Show[
>   ListContourPlot[data],
>   ParametricPlot[{x, Pi/2/x},
>    {x, -2, 2},
>    PlotStyle ->  Directive[Red, Thick],
>    Exclusions ->  0]]
>
>
> Bob Hanlon
>
> ---- "Iv=C3=A1n Lazaro"<gaminster at gmail.com>  wrote:
>
> ==========================
> Dear all,
>
> I'm trying to make visible in a ListContourPlot for a function, a maximum
> value for it. The thing is that the Max of this function is very specific
> (Log[2]) and I need that my readers can follow the "movement" of this
> maximum, although i want them to have the rest of the contour. Is this
> possible within the ListContourPlot function? Or should I make this curve
> apart and then "paste it" in the contour?
>
>
>
> Iv==E1n.
>
>
>
>
I copied and pasted this code into Mathematica 7 and many errors were
generated when I tried to execute it. I then realized that there were
some errors in the "=" signs. After fixing this (at least no errors
appear), the two plots generated are incorrect --- first one is an empty
frame [-1,-1] x [-1,-1] and second one is in the same size frame with
only a broken vertical line in it.

Would you please tell me how to fix this code.

Thanks,
--V. Stokes

```

• Prev by Date: Plot and advanced filling
• Next by Date: Using numbers close to to zero in Mathematica version 6
• Previous by thread: Re: Show a maximum curve in ListContourPlot
• Next by thread: Re: Multiple Window Feature Request