MathGroup Archive 2011

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

Search the Archive

Re: Plotting stacked lineplots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122544] Re: Plotting stacked lineplots
  • From: Pete Boardman <pete.boardman at mac.com>
  • Date: Mon, 31 Oct 2011 06:53:07 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110300923.EAA15375@smc.vnet.net>

On 30 Oct 2011, at 09:23, Deep wrote:

> Is it possible to use mathematica to plot stacked lineplots as shown
> at http://www-958.ibm.com/software/data/cognos/manyeyes/page/Stack_Graph_for_Categories.html

I believe they're called "stacked line charts" in Mathematica, and they appear to be an application of ListLinePlot, under which heading 
you'll find this example that uses Accumulate to generate the data:

data = {{2, 3, 3, 4, 8, 8, 8, 8, 9, 10}, {1, 1, 4, 5, 5, 6, 7,
     9, 9, 10}, {1, 2, 4, 5, 7, 7, 8, 9, 9, 10}};

ListLinePlot[Accumulate[data], 
 Filling -> {1 -> {Axis, LightRed}, 2 -> {{1}, LightOrange}, 
   3 -> {{2}, LightBlue}}, PlotStyle -> {Red, Orange, Blue}]






  • Prev by Date: Re: Plotting stacked lineplots
  • Next by Date: Re: Simple question about inverse of a function
  • Previous by thread: Re: Plotting stacked lineplots
  • Next by thread: Re: Plotting stacked lineplots