Re: BarChart
- To: mathgroup at smc.vnet.net
- Subject: [mg94912] Re: BarChart
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 30 Dec 2008 05:54:05 -0500 (EST)
- References: <gjacr1$ov2$1@smc.vnet.net>
Hi, and BarChart[MapThread[Labeled[#1, #2, Right] &, {Transpose[{start, duration, end}], names}], ChartLayout -> "Stacked", ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel", BarOrigin -> Left] ?? Regards Jens P_ter wrote: > Hello, > I want to make a kind of Gantt chart. > start={0, 135, 180, 195, 225, 270, 285, 315, 360, 375, 405, 450, 465}; > duration={495, 45, 15, 90, 45, 15, 90, 45, 15, 90, 45, 15, 150}; > end={495, 180, 195, 285, 270, 285, 375, 360, 375, 465, 450, 465, 615}; > names= {"Cooking", "Spinning 1", "Mixing 1", "Packing 1", "Spinning 2", "Mixing 2", "Packing 2", "Spinning 3","Mixing 3", "Packing 3", "Spinning 4", "Mixing 4", "Packing 4"} > So, Cooking starts at 0, has a duration of 495 and ends at 495. Spinning 1 starts at 135, has a duration of 45 and ends at 180 etc. > I would like to have all in one BarChart. I can do it, but it is very awkward and I also have problems e.g. Cooking does not show up in: > b2 = BarChart[{495}, ChartLayout -> "Stepped", > ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel", > BarOrigin -> Left, ChartLabels -> "Cooking"] > Thanks in advance. > with friendly greetings, > P_ter >