[R] barp {plotrix} Start bars at 0 with a vector of positive values

Pascal Oettli kridox at ymail.com
Fri Jun 13 12:19:05 CEST 2014


Hi Jorge,

It is in order to have different barplots with the same range of
limits, to keep them easily comparable. Some have negative values,
some others no.

Pascal

On Fri, Jun 13, 2014 at 7:11 PM, Jorge I Velez <jorgeivanvelez at gmail.com> wrote:
> Hi Pascal,
>
> Perhaps I am missing something, but what about changing passing ylim = c(0,
> 10) to barp()?
>
> Best,
> Jorge.-
>
>
> On Fri, Jun 13, 2014 at 7:50 PM, Pascal Oettli <kridox at ymail.com> wrote:
>>
>> Dear list,
>>
>> Please consider the following example:
>>
>> library(plotrix)
>> barp(c(2,3,4,5,6,7,8), ylim=c(-10,10))
>>
>> How to force the bars to start at 0? I could not find the way to do it.
>>
>> Regards,
>> Pascal
>>
>> ______________________________________________
>> R-help at 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.
>
>



-- 
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan



More information about the R-help mailing list