0

I have asked a similar question where I could use stack=T to solve my problem.

However, when I introduce another factor, stack=T is not working.

Please see this example:

test <- data.frame(a=c(rep('x', 4),rep('y',4)),
                   b=c(2,-2,4,-3,5,-1,3,-5),
                   d=c('m','m','n','n','m','m','n','n')) 

barchart(b~a, data=test, col=c("#00FFFF"), stack=TRUE,group=d)

barchart1

but I want to get something like this:

barchart(b~a, data=test, col=c("#00FFFF"), stack=F,group=d)

barchart2

and at the same time, align 0 in the same line.

Community
  • 1
  • 1
user36102
  • 275
  • 2
  • 3
  • 12

1 Answers1

0

barchart(b~a, data=test, col=c("#00FFFF"), stack=F,group=d, origin=0)

user36102
  • 275
  • 2
  • 3
  • 12