Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6075
| From | "Chris Degnen" <degnen@cwgsy.net> |
|---|---|
| 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 | <j8m374$s3s$1@smc.vnet.net> (permalink) |
| References | <j8j5ef$f7l$1@smc.vnet.net> |
It can be done like this:
data = Table[Accumulate[RandomReal[{0, 1}, 100]], {6}];
stackeddata = Accumulate[data];
preliminary = ListPlot[stackeddata];
colours = Cases[preliminary, _Hue, Infinity];
fillingspec =
Array[# - 1 -> {{#}, Lighter[colours[[#]]]} &,
Length[colours]] /. (0 -> {{1}, col_}) -> (1 -> {Axis, col});
ListLinePlot[stackeddata, Filling -> fillingspec]
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
> ?
>
> Regards,
> Deepankar
>
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Plotting stacked lineplots Deep <deepankar.sharma@gmail.com> - 2011-10-30 09:29 +0000 Re: Plotting stacked lineplots Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-10-31 11:55 +0000 Re: Plotting stacked lineplots Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-10-31 11:49 +0000 Re: Plotting stacked lineplots "Chris Degnen" <degnen@cwgsy.net> - 2011-10-31 12:10 +0000
csiph-web