Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Intersection points of two contour plots
Replies: 1   Last Post: May 1, 2013 9:40 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Bob Hanlon

Posts: 891
Registered: 10/29/11
Re: Intersection points of two contour plots
Posted: May 1, 2013 9:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


ContourPlot[Sin[3 x*y] == 0,
{x, -3, 3}, {y, -3, 3},
RegionFunction ->
Function[{x, y}, x*y < 0],
Exclusions -> {x*y == 0},
ContourStyle -> Black]


or


t1 = Table[
If[x*y < 0, Sin[3 x*y], Sequence[]],
{x, -3, 3, .1}, {y, -3, 3, .1}];


ListContourPlot[t1,
Contours -> {0},
ContourShading -> False,
DataRange -> {{-3, 3}, {-3, 3}},
RegionFunction ->
Function[{x, y}, x*y < 0],
ContourStyle -> Black]



Bob Hanlon




On Wed, May 1, 2013 at 3:36 AM, Luiz Melo <lmelo@ufsj.edu.br> wrote:

> Hi group,
> Please consider the example below to illustrate my question (the
> original problem is somehow much more complicated):
>
> t1 = Table[Sin[3 x*y], {x, -3, 3, .1}, {y, -3, 3, .1}];
>
> t2 = Table[If[x*y < 0, Sin[3 x*y]], {x, -3, 3, .1}, {y, -3, 3, .1}];
>
> p1 = ListContourPlot[t1, Contours -> {0}, ContourShading -> False,
> DataRange -> {{-3, 3}, {-3, 3}}, ContourStyle -> Black];
>
> p2 = ListContourPlot[t2, Contours -> {0}, ContourShading -> False,
> DataRange -> {{-3, 3}, {-3, 3}}, ContourStyle -> {Red, Dashed, Thick}];
>
> Show[p1, p2]
>
> Is there a way to show only the results of the intersection of these
> two contour plots?
>
> Thank you
> Luiz
>
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.