[R] plot question
Marc Schwartz
MSchwartz at MedAnalytics.com
Thu Mar 3 17:44:49 CET 2005
On Thu, 2005-03-03 at 17:29 +0100, Christoph Lehmann wrote:
> I have the following simple situation:
>
> tt <- data.frame(c(0.5, 1, 0.5))
> names(tt) <- "a"
> plot(tt$a, type = 'o')
>
> gives the following plot ('I' and '.' represent the axis):
>
> I
> I
> I X
> I
> I
> I X X
> I...........
> 1 2 3
>
> what do I have to change to get the following:
>
>
> I
> I
> I X
> I
> I
> I X X
> I.....................
> 1 2 3
>
> i.e. the plot-region should be widened at the left and right side
>
> thanks for a hint
Use 'xlim' to specify the range of the x axis:
plot(c(0.5, 1, 0.5), type = 'o', xlim = c(0, 4))
See ?par for more information.
HTH,
Marc Schwartz
More information about the R-help
mailing list