MathGroup Archive 2007

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

Search the Archive

Re: Re: problem with contourplot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82114] Re: [mg81871] Re: problem with contourplot
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Fri, 12 Oct 2007 03:00:42 -0400 (EDT)
  • References: <fe27r1$joh$1@smc.vnet.net> <29006155.1191637139966.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

I wonder why you used

ColorFunction ->
  (ContourColors[contourlist, ColorData["ThermometerColors"]][#]&)

when

ColorFunction ->
  ContourColors[contourlist, ColorData["ThermometerColors"]]

is the same thing?

Bobby

On Fri, 05 Oct 2007 03:54:51 -0500, David Park <djmpark at comcast.net> wro=
te:

> Here is a solution using DrawGraphics. (Except this and other complex
> function graphics routines are still in a development notebook and not=
  =

> quite
> yet in DrawGraphics.)
>
> First define the function as a complex function:
>
> dispsqr[kl_][
>   z_] := (1 + (1/
>      kl)^2 (1 + (\[ImaginaryI] Sqrt[\[Pi]]
>         z \[ExponentialE]^-(z/(Sqrt[2] kl))^2 (1 +
>          Erf[(\[ImaginaryI] z)/(Sqrt[2] kl)]))/(Sqrt[2] kl)))^2
>
> The following statement makes the plot:
>
> With[
>  {f = dispsqr[0.1],
>   zmin = -2 - 1.0 \[ImaginaryI],
>   zmax = 2 + 1.5 \[ImaginaryI],
>   contourlist = {0, 0.001`, 0.01`, 0.05`, 0.15`, 0.25`, 0.4`, 1, 2, =
4,
>      10, 50, 400}},
>  Draw2D[
>   {ComplexCartesianContour[f[z], {z, zmin, zmax}, Abs,
>     Contours -> contourlist,
>     ColorFunctionScaling -> False,
>     ColorFunction -> (ContourColors[contourlist,
>          ColorData["ThermometerColors"]]),
>     PlotPoints -> {25, 25},
>     PlotRange -> {0, 400},
>     ClippingStyle -> Gray]},
>   Frame -> True, FrameLabel -> {Re, Im}, RotateLabel -> False,
>   PlotLabel ->
>    Row[{"Modulus of ", 0 < HoldForm[dispsqr[0.1][z]] < 400}],
>   ImageSize -> 600]
>  ]
>
> ComplexCartesianContour accepts complex expressions and there is a sin=
gle
> complex iterator. Any function producing real output, in this case Abs=
,  =

> can
> be applied to the function to produce the contours. ContourColors is a=

> DrawGraphics routine that produces distinct colors for all contour  =

> regions
> no matter what the spacing of the contour values are.  The plot clearl=
y
> shows all the contours. It is not necessary to use extended precision.=

>



-- =

DrMajorBob at bigfoot.com


  • Prev by Date: Re: "dereference" variable
  • Next by Date: Re: Re: Re: rule based program for "Deleting repeated members of a list."
  • Previous by thread: Re: Re: problem with contourplot
  • Next by thread: Manipulate+Plot showing no output