Reputation: 33
I have two values of averages LR50<-(424.8, 425.7)
. I want to plot these as a barplot barplot(LR50)
. Now, I don't need any of the information except from ylim=c(424,426.5)
. When I change the x-axis axis(1,at=c(0,10), pos=424)
there is still bar plot that falls below the axis.
How do I get the barplot to only plot from the new x-axis at y=424 and up?
Upvotes: 3
Views: 4231
Reputation: 115485
You will need to use the xpd
parameter (and set it to FALSE), this will clip the plot to the plotting region.
barplot(LR50,ylim = c(424,426.5),xpd=FALSE)
axis(1,at=c(0,10),pos=424)
Upvotes: 3