Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: same color above a treshold

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87099] Re: same color above a treshold
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 31 Mar 2008 04:52:26 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <fsq2er$grm$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

ContourPlot[x*Exp[-x^2 - y^2], {x, -2, 2}, {y, -2, 2},
  PlotRange -> All, ColorFunctionScaling -> False,
  ColorFunction -> (If[Abs[#] > 0.25, RGBColor[1, 0, 0],
      RGBColor[0, 2 # + 1, 0]] &)]

for z-values < 1/4

Regards
   Jens

Luigi B wrote:
> Dear all,
>  in ArrayPlot or ContourPlot, I need to color the points exceeding a
> certain treshold with the same color (say red).
> I guess that could be done defining an appropriate ColorFunction...
> but I cannot work it out.
> Could anyone help me?
> 
> Thanks
> Luigi
> 


  • Prev by Date: Re: Separate input/output files
  • Next by Date: Re: The FinancialData Function
  • Previous by thread: same color above a treshold
  • Next by thread: Minimum width of Button[.] on different platforms