Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6076

Re: Plotting stacked lineplots

From Pete Boardman <pete.boardman@mac.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Plotting stacked lineplots
Date 2011-10-31 12:10 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j8m383$s48$1@smc.vnet.net> (permalink)
References <201110300923.EAA15375@smc.vnet.net>

Show all headers | View raw


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}]



Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Plotting stacked lineplots Pete Boardman <pete.boardman@mac.com> - 2011-10-31 12:10 +0000

csiph-web