Re: [R] combining bar and column graphs?

2008-05-12 Thread Michael Kubovy
Perhaps
?mosaic
or
?mosaicplot
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
 McCormick RoadCharlottesville, VA 22903
Office:B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/




On May 11, 2008, at 11:56 AM, Me wrote:

 Hi, I'm hoping to find out whether R, or an R add-on, can generate a  
 particular type of graph. And, more basically, whether such a type  
 of graph even makes sense.

 I'm looking for something resembling both a column chart and a bar  
 chart, where the basic visual unit is a solid rectangle of color  
 that can be extended either horizontally, vertically, or both. The  
 data that needs to be graphed consists of the relative contributions  
 of a number (6 or 8) of companies (entities, whatever) to a common  
 fund, over the course of a number of years (say, 1990-2008).  I'm  
 picturing years on the X-axis, and dollar amounts on the Y-axis  
 (say, $0-$100,000).  From a temporal perspective, every year will  
 have at least one contributor, starting with dollar zero, but some  
 years will have multiple contributors.  From a company  
 perspective, some companies will contribute, e.g., dollars $1,001- 
 $5,000 for several years running, visually forming a horizontal  
 block riding on top of whatever happens to be below.

 So as a simple example, between the years 2000 and 2001, Company A  
 might inhabit a solid block extending from dollar zero to dollar  
 1000, two years wide. In year 2000, Company B might contribute  
 dollars $1,001-$2,000, while right next door in year 2001, a  
 different Company C might contribute dollars $1,001-$10,000.

 Is it possible to have this sort of horizontal/vertical chart  
 generated automatically, or is this impossible? Do I need to  
 generate a year-on-year column graph and manually elide the  
 boundaries between companies' contributions in successive years,  
 thus forming the horizontal blocks I have in mind manually?  Is  
 there perhaps another software tool that would be good for this?

 Thanks very much - this is a long question...

 __
 R-help@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.


[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] combining bar and column graphs?

2008-05-12 Thread Me

Michael Kubovy wrote:

Perhaps
?mosaic
or
?mosaicplot


Thanks for these helpful suggestions - I will try them both out -

__
R-help@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.


[R] combining bar and column graphs?

2008-05-11 Thread Me
Hi, I'm hoping to find out whether R, or an R add-on, can generate a 
particular type of graph. And, more basically, whether such a type of 
graph even makes sense.


I'm looking for something resembling both a column chart and a bar 
chart, where the basic visual unit is a solid rectangle of color that 
can be extended either horizontally, vertically, or both. The data that 
needs to be graphed consists of the relative contributions of a number 
(6 or 8) of companies (entities, whatever) to a common fund, over the 
course of a number of years (say, 1990-2008).  I'm picturing years on 
the X-axis, and dollar amounts on the Y-axis (say, $0-$100,000).  From a 
temporal perspective, every year will have at least one contributor, 
starting with dollar zero, but some years will have multiple 
contributors.  From a company perspective, some companies will 
contribute, e.g., dollars $1,001-$5,000 for several years running, 
visually forming a horizontal block riding on top of whatever happens 
to be below.


So as a simple example, between the years 2000 and 2001, Company A might 
inhabit a solid block extending from dollar zero to dollar 1000, two 
years wide. In year 2000, Company B might contribute dollars 
$1,001-$2,000, while right next door in year 2001, a different Company C 
might contribute dollars $1,001-$10,000.


Is it possible to have this sort of horizontal/vertical chart generated 
automatically, or is this impossible? Do I need to generate a 
year-on-year column graph and manually elide the boundaries between 
companies' contributions in successive years, thus forming the 
horizontal blocks I have in mind manually?  Is there perhaps another 
software tool that would be good for this?


Thanks very much - this is a long question...

__
R-help@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.