[R] Plotting barplot and scatterplot on same device - x-axis problem

Jim Lemon jim at bitwrit.com.au
Fri Jun 20 15:16:41 CEST 2008

On Fri, 2008-06-20 at 01:39 -0700, Thomas Pedersen wrote:
> Hi R-users
> I'm a relative newbie and uses R mostly for graphical purpose. I have a
> layout problem when plotting a scatterplot and a barplot using
> par(new=TRUE). The baseline of the x-axis is not positioned equal for the
> two plotting functions (see picture) and I have been unable to find out how
> this is changed. 

Hi Thomas,
You might find that "barp" in the plotrix package will do what you want
as it centers the bars on integral values.


More information about the R-help mailing list