search for: barheight

Displaying 3 results from an estimated 3 matches for "barheight".

2008 Oct 24
Automatically adjust text size in plot
...w() plot.window(xlim=c(0,1),ylim=c(0,1)) barnames.plot<"c",lapply(barnames,function(x)paste(strwrap(x,Width),collapse="\n"))) text(barnames.plot,x= (, 1, length.out = length(barnames)+1)-0.5/length(barnames))[-1],y=0.5,cex=Cex) for(i in 1:nrow(answers)){ barheight<-rep(0,length(barnames)) barheight[as.numeric(names(subQ.tables[[i]]))]<-subQ.tables[[i]] barplot(barheight,space=0) } The question is, how do I figure out the appropriate "Width" and "Cex" parameters as a function of barnames? That is, with varying text lengths of the b...
2017 Jul 05
How can I make the legend in ggplot2 the same height as my plot?
...)) Scenario1<-P1+geom_point(aes(colour = value), size = 1)+ theme_bw()+ theme(axis.text.x = element_blank(),axis.text.y = element_blank()) Scenario1<-Scenario1+facet_wrap(~variable, ncol=2)+scale_color_gradientn(colours = rainbow(48)) Scenario1+guides(fill = guide_colorbar(bar width = 1.5, barheight = unit(10, "mm"))) Thanks, KG [[alternative HTML version deleted]]
2008 Sep 27
multiple plots - editing ggplot2 plot
Hi All, I am trying to build a composite plot, with multiple categories, using ggplot2. In principle, it could be done using facetting, but I do not seem to be able to get past the defaults, so I try building each plot separately, then putting them all together using frameGrob and placeGrob. For this, I need to know how to: 1) format the legend with a different layout (e.g 2 rows by 2 columns,