Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

problem with contourplot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81812] problem with contourplot
  • From: KLEIN Rudy <Rudy.Klein at lpmi.uhp-nancy.fr>
  • Date: Thu, 4 Oct 2007 04:19:34 -0400 (EDT)
  • Reply-to: Rudy.Klein at lpmi.uhp-nancy.fr

hello,
I'm trying to contourplot a function with high gradients.
this is my code:

In > contoursLandau[kld_, contoursList_List, {rgX_, rgY_}] := Module[{disp},
  
   disp[kl_, z_] :=
    SetPrecision[
     1 + (1/kl)^2*(1 +
         I*Sqrt[Pi]*(z/(Sqrt[2.]*kl))*
          Exp[-(z/(Sqrt[2.]*kl))^2]*(1 + Erf[I*z/(Sqrt[2.]*kl)])),
     100];
  
   fonctionColoration=RGBColor[0, 0, #] &;
  
   ContourPlot[
    Abs[disp[kld, x + I y]]^2, {x, rgX // First, rgX // Last}, {y,
     rgY // First, rgY // Last},
    ColorFunction -> fonctionColoration, Contours -> contoursList,
    PlotPoints -> 100]
  
  
   ];



In > contoursLandau[0.1, ({4, 1, 0.4, 0.25, 0.15, 0.05, 0.01, 0.001} // 
Reverse), {{-1.5, 1.5}, {0.5, -1.5}}]


the problem is with the coloration of the plot: i'd like to Log-scale 
the contours and have for example:

 RGBColor[0,0.5,#]&/@Log[10, {4, 1, 0.4, 0.25, 0.15, 0.05, 0.01, 0.001} 
// Reverse] // Rescale

but it doesn't work and i can't identifie the cause of the problem...
thanks for help

Rudy










  • Prev by Date: Re: BarChart - intensity of colour increases up the bar
  • Next by Date: Re: Help with solving ODE
  • Previous by thread: Re: Interpolation does not quite interpolate
  • Next by thread: Re: problem with contourplot