Hi, I would like to create a 3 dimensional barplot of 16 odds ratios that demonstrate an interaction between two variables (CD14 and CD23). Here is an example of what the graph I would like to produce (http://www.xfy.com/manual/dev/developer/1.4/spec/image/chart/type_3d.gif): Here is are the odds ratios I would like to graph: Odds ratios CD14-1 CD14-2 CD14-3 CD14-4 CD23-1 1 0.61 2.1 6.1 CD23-2 1.5 1.3 3.5 11.9 CD23-3 1.8 1.5 4.4 10.6 CD23-4 8.2 4.6 5.5 16.8 Thanks! Terri
Install the fortunes package, then do:> library(fortunes) > fortune(197)-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Rice, Terri > Sent: Tuesday, December 22, 2009 11:38 AM > To: r-help at r-project.org > Subject: [R] 3-D barplot > > Hi, > > I would like to create a 3 dimensional barplot of 16 odds ratios that > demonstrate an interaction between two variables (CD14 and CD23). > > Here is an example of what the graph I would like to produce > (http://www.xfy.com/manual/dev/developer/1.4/spec/image/chart/type_3d.g > if): > > Here is are the odds ratios I would like to graph: > > Odds ratios CD14-1 CD14-2 CD14-3 CD14-4 > CD23-1 1 0.61 2.1 6.1 > CD23-2 1.5 1.3 3.5 11.9 > CD23-3 1.8 1.5 4.4 10.6 > CD23-4 8.2 4.6 5.5 16.8 > > Thanks! > > Terri
> I would like to create a 3 dimensional barplot of 16 odds ratios that > demonstrate an interaction between two variables (CD14 and CD23).odds<- matrix( c(1, 0.61, 2.1, 6.1, 1.5 , 1.3, 3.5, 11.9, 1.8 , 1.5, 4.4, 10.6, 8.2 , 4.6, 5.5, 16.8), 4,4, byrow=T) matplot(1:4, odds, type='b', log='y', xaxt='n', xlab='CD23', ylab='Odds Ratio') axis(1, 1:4, 1:4) No, this did not create a 3-d bar plot, it created something far more useful. In this plot you can see that most of the data fits an additive model and how well it does so. It is much better than what you requested -- which isn't hard as a 3-d barplot is one of the worst tools ever made for information conveyance. Terry Therneau