[R] barplot with log base 2 scale or shift the x-axis

Yasir Kaheil kaheil at gmail.com
Sat May 3 20:45:18 CEST 2008


user parameter "offset"
barplot(d,offset = -2) #assuming that d is your data


Summer Nitely wrote:
> 
> Hi,
> I have data that is on a log base 2 scale.  It goes from negative factors
> of
> 2 to positive ones.  I am using barplot.  However, I don't want the data
> centered at 0 - I want the min of the yaxis to be just below the lowest
> value in the data. The plots are kind of deceptive switching between
> positive and negative.  I see that barplot has a log option, but that
> doesn't seem to be adjustable for a log base 2 scale.  Does anyone know
> how
> to adjust the x-axis, so it's at y= -value rather than at y=0?  I''d
> rather
> not add a factor to the data, unless I can have accurate labels on the
> y-axis.
> Any ideas?
> Thanks,
> Summer
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/barplot-with-log-base-2-scale-or-shift-the-x-axis-tp17028736p17036612.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list