Hi, I am interested in implementing a special variant of balloonplot. Let me explain with an example dataset from the reference manual :
library(gplots) data(Titanic) dframe<-as.data.frame(Titanic) survived<-dframe[dframe$Survived=="Yes",] attach(survived) balloonplot(x=Class,y=list(Age,Sex),z=Freq,sort=TRUE,show.zeros=TRUE,cum.margins=FALSE, Â Â Â Â Â Â Â Â Â Â Â main="BalloonPlot : Surviving passengers") # standard plot # Now comes the attempt at something more special FreqThresh=50 # A threshold level Freqdev<-Freq-FreqThresh # A new variable colors=ifelse(Freqdev>0,"green","magenta") balloonplot(x=Class,y=list(Age,Sex),z=Freqdev,sort=TRUE,show.zeros=TRUE,cum.margins=FALSE,dotcol=colors, show.margins=FALSE,main="BalloonPlot : Surviving passengers") Â I am interested in a table with the values unchanged from the titanic dataframe. These values should be highlighted in balloons in two different colours, letâs say, green and magenta. For positive values of Freqdev, the balloons will be green and have a size depending on the magnitude of Freqdev. For negative values of Freqdev, the balloons will have a colour of magenta and have a size proportional to the absolute values of Freqdev. I am not sure if a simple tweak can lead to a solution. I will appreciate any help that I can get. Thanks, Ravi [[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.