plot - R: xlab of multiple variables being cut off in barplot -



plot - R: xlab of multiple variables being cut off in barplot -

hi have r barplot

barplot(data, xlab = num, cex.names = 0.5)

the label created

num <- c(var1, var2, var3)

when plot created each variable takes newline , lastly cutting off. there way create them go on same line? thanks

these types of values in vector plus how obtained in code.

examplefunc<-function(word="category") rangestart<-rangestartvaluesvectorized[1] rangeend<-rangeendvaluesvectorized[length(rangeendvaluesvectorized)] num<-as.character(c(word, rangestart, rangeend)) result<-barplot(info, main="mean plot", xlab=num,cex.names=.5) rangeend=1000 rangestart=2000

you need utilize little paste trick turn string of length 3 string of length 1 same contents:

rangestart <- 5 rangeend <- 22 word <- "category" label <- c(word, as.character(c(rangestart, rangeend))) label <- paste(label, collapse = " ") barplot(vadeaths, xlab = label)

r plot

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -