Hello I'm trying to create a barplot with a couple of stacked positive 
values and with one negative value for each group.

example:

trees<-c(20,30,10)
shrubs<-c(12,23,9)
veg<-c(2,3,4)
soil<-c(-100,-123,-89)
example1<-t(cbind(trees,shrubs,veg))

barplot(example1)

#this works so far

#but now:

example2<-t(cbind(trees,shrubs,veg,soil))
barplot(example2)

This shows no more stacked bars. But I want to keep the bars like 
example1 and just add the negative values which have another scale 
downwards.
So I tried:

barplot(example1,axes=F)
barplot(example2["soil",],add=T,axes=F)
axis(side=2,at=c(-150,-100,-50,0,10,20,30))

But I still does not work for the axis??

I would appriciate any kind of hint
Greetings
Paul Magdon


-- 
_______________________________________________________________________
BSc. Paul Magdon
-Research Assistant-
Institute of Forest Management
Forest Assessment & Remote Sensing, Forest Growth, Forest Planning
Faculty of Forest Sciences and Forest Ecology
Georg-August-University Göttingen
Phone +49 551 39 3573
[EMAIL PROTECTED] / skype: paul.magdon

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to