Re: Points on a ContourPlot

• To: mathgroup at smc.vnet.net
• Subject: [mg91772] Re: Points on a ContourPlot
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Sun, 7 Sep 2008 05:39:54 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <g9t6o4\$j9v\$1@smc.vnet.net>

```SeekUp wrote:
> I am trying to add Points to my ContourPlot to highlight certain points. The
> code below doesn't work. Any clues how to do it?
>
> tia
>
> --------------------------------------------------------------------------
>
> Show[
>
>
> Graphics[ContourPlot[StabilityFnlens[f1, f2], {f1, -10, 30}, {f2, -10,
==^^^^^^^^
Graphics directive not needed.

> 30},(*ContourStyle->None,*)ContourLabels -> Automatic, PlotPoints -> 100,
> Contours -> 5, PlotRange -> {-1, 1},Frame -> True,FrameStyle ->
> Directive[Thick],LabelStyle -> {18, FontFamily -> "Arial"}],
============================================================^^^
Missing square bracket here to end the first -- non needed -- Graphics
directive.

>
> Graphics[{Red, PointSize[Large], Point[{{5, 5}, {9, 9}, {10, 10}, {20,
> 20}, }]}] (* doesn't work *)
====^^^
Syntax error: spurious comma.

> ]
> ]

The following example works as expected:

f[x_, y_] := Cos[x] + Cos[y]
g = ContourPlot[f[f1, f2], {f1, -10, 30}, {f2, -10, 30},
ContourLabels -> Automatic, Contours -> 5, PlotRange -> {-1, 1}];
pts = Graphics[{Red, PointSize[Large],
Point[{{5, 5}, {9, 9}, {10, 10}, {20, 20}}]}];
Show[g, pts]

Regards,
-- Jean-Marc

```

• Prev by Date: Re: FindFit and NormFunction (to find a best fit by medians)
• Next by Date: Re: Rearrangement of expression
• Previous by thread: Re: Points on a ContourPlot
• Next by thread: Re: Points on a ContourPlot