[R] Creating a Clustered-Stacked Column Chart

David Winsemius dwinsemius at comcast.net
Sat Oct 10 14:47:00 CEST 2009


I gave you more than you deserved. You provided no data and a link to  
what appeared to me to be a rather ugly looking chart. I gave you the  
help examples from the lattice equivalent. The barchart (stacked  
column chart in your termnology) is "clustered" although it happens to  
be presented in an informative display rather than an uninformative one.

(Suggest you read the Posting Guide.)

-- 
David
On Oct 10, 2009, at 7:53 AM, zhijie zhang wrote:

> Hi David,
>   Your codes are for stacked chart. Actually, i hope to Create a  
> Clustered-Stacked Column Chart, which means that a chart will  
> combine the traits of stacked chart and clustered chart, see the  
> example in the page http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html 
> .
>   Thanks.
> 2009/10/10 David Winsemius <dwinsemius at comcast.net>
> library(lattice)
> barchart(Titanic, scales = list(x = "free"),
>          auto.key = list(title = "Survived"))
>
> Or if you prefer vertical:
>
> barchart(Titanic, scales = list(x = "free"),
>         auto.key = list(title = "Survived"), horizontal=FALSE)
>
> There are adjustments available to the space between bars.
>
> barchart(Titanic, scales = list(x = "free"),
>         auto.key = list(title = "Survived"), horizontal=FALSE,  
> box.ratio=100)
>
>
>
> On Oct 9, 2009, at 9:57 PM, zhijie zhang wrote:
>
> Thanks a lot. Maybe someone else has the method to solve that.
>
>
> 2009/10/9 John Kane <jrkrideau at yahoo.ca>
>
> I don't think I've seen an R version, probably because the technique  
> is not
> very good for displaying data.
>
> Have a look at http://chartsgraphs.wordpress.com/tag/r-and-excel/  
> for an
> alternative method of displaying the data using lattice.
>
> --- On Fri, 10/9/09, zhijie zhang <rusers.sh at gmail.com> wrote:
>
> From: zhijie zhang <rusers.sh at gmail.com>
> Subject: [R] Creating a Clustered-Stacked Column Chart
> To: r-help at stat.math.ethz.ch
> Received: Friday, October 9, 2009, 5:31 AM
> Hi all,
>  In R, is there some functions or ways to
> create a Clustered-Stacked
> Column Chart as the example in the following page
> http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html?
>  I have browsed the R Graph Gallery (
> http://addictedtor.free.fr/graphiques/)
> and searched the R site, and didnot find an appropriate
> method to do it.
>  Anybody has met this problem before?
>  Thanks a lot.
>
>   [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org
> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html 
> >
>
> and provide commented, minimal, self-contained,
> reproducible code.
>
>
>
>    __________________________________________________________________
> Get the name you've always wanted @ymail.com or @rocketmail.com! Go to
> http://ca.promos.yahoo.com/jacko/
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list