MathGroup Archive 2009

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

Search the Archive

Re: Highlighting data sections with a different

  • To: mathgroup at
  • Subject: [mg102420] Re: [mg102404] Highlighting data sections with a different
  • From: Bob Hanlon <hanlonr at>
  • Date: Sun, 9 Aug 2009 06:03:15 -0400 (EDT)
  • Reply-to: hanlonr at

data = FinancialData["IBM", "Jan. 1, 2004"];

min = Floor[Min[data[[All, 2]]]];

max = Ceiling[Max[data[[All, 2]]]];

data2 = data /. {d_, v_} -> {d, If[v < 80, max, min]};

   Filling -> min,
   PlotStyle -> Transparent],
   Joined -> True]

   PlotStyle -> Transparent,
   Filling -> min,
   FillingStyle -> LightBlue],
   Joined -> True,
   ColorFunctionScaling -> False,
   ColorFunction ->
    Function[{d, v},
     If[v < 80, Red, Lighter[Blue]]]]

Bob Hanlon

---- Tyler <hayes.tyler at> wrote: 

Hello All:

I was wondering if someone could point me in the right direction on
how to shade the background of certain regions on a plot. More
specifically, I am interested in using DateListPlot and FinancialData
to produce a similar economic chart as "Chart 2" found here:

I've thought of using both "Filling" and/or "BackGround" but frankly
have gotten nowhere. Any hints on how to approach this?



  • Prev by Date: Re: error with Sum and Infinity
  • Next by Date: Re: Highlighting data sections with a different
  • Previous by thread: Re: Re: iterative convolution, discret
  • Next by thread: Select text with keyboard?