On Sep 3, 2010, at 1:12 PM, Zoppoli, Gabriele (NIH/NCI) [G] wrote:

Dear r-help mailing list,

this seems stupid, but I actually don't find the solution:

if I have a vector of numbers x of length n, ranging, say, from -3 to 4, if I do

barplot (x)

all the values below 0 go downwards, and all the positive values go upward. How can I make them all begin from the minimum pointing upwards?


> grp.n <-c(0, -1, -2, -3, -5, -1,  3, -2,  2,  0)
> barplot(grp.n-min(grp.n), axes=FALSE)
> axis(2, grp.n-min(grp.n), labels=as.character(grp.n))


Compare
> barplot(grp.n, axes=FALSE)


--
David Winsemius, MD
West Hartford, CT

______________________________________________
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.

Reply via email to