Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: 2D-Plot Colorings

  • To: mathgroup at
  • Subject: [mg54239] Re: [mg54218] 2D-Plot Colorings
  • From: DrBob <drbob at>
  • Date: Mon, 14 Feb 2005 00:57:54 -0500 (EST)
  • References: <>
  • Reply-to: drbob at
  • Sender: owner-wri-mathgroup at

Here's the simplest solution I can think of:

     {x, -1, -Sqrt[0.4]}, PlotStyle -> Blue],
    Plot[x^2, {x, -Sqrt[0.4], -Sqrt[0.2]},
     PlotStyle -> {AbsoluteThickness[2],
       Red}], Plot[x^2, {x, -Sqrt[0.2],
      Sqrt[0.2]}, PlotStyle -> Blue],
    Plot[x^2, {x, Sqrt[0.2], Sqrt[0.4]},
     PlotStyle -> {AbsoluteThickness[2],
       Red}], Plot[x^2, {x, Sqrt[0.4], 1},
     PlotStyle -> Blue]];


On Sun, 13 Feb 2005 22:17:05 -0500 (EST), Bruce Colletti <vze269bv at> wrote:

> Re Mathematica 5.1.
> In plotting y = x^2 over [-1,1], I want to color red those points whose y-values are in [0.2, 0.4].  All others are blue.
> Although I can do this by manipulating the FullGraphics object or by displaying separate plots, is there an easier way via some Plot option?  ColorFunction doesn't seem to work (probably user error), and neither does the Plot3D convention in which shading is co-declared with the function.
> Thankx.
> Bruce

DrBob at

  • Prev by Date: Re: rules and lists
  • Next by Date: Re: Fourier Transfer and a game?!?!
  • Previous by thread: 2D-Plot Colorings
  • Next by thread: Re: 2D-Plot Colorings