MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Multiple conditions in ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102999] Multiple conditions in ContourPlot
  • From: Theo Moore <tsg.moore at googlemail.com>
  • Date: Thu, 3 Sep 2009 19:54:25 -0400 (EDT)

Suppose I had a function f[z] and I wanted to plot the contour such
that the imaginary part of f[z] is zero and the real part is positive.
I thought I could use:

ContourPlot[ (Im[f[x + y*I] == 0) && (Re[f[x + y*I] >= 0), {x, -5, 5},
{y, -5, 5}]

But it does not work.

I can do it using only one. For example,

ContourPlot[Im[f[x + y*I] == 0, {x, -5, 5}, {y, -5, 5}]

But how do  you use multiple logical conditions?


  • Prev by Date: Re: Re: Simplifying If expressions
  • Next by Date: Re: Can I do this faster?
  • Previous by thread: Re: How can I increase period of waveform from 1 cps (hz) to 4000
  • Next by thread: Re: Multiple conditions in ContourPlot