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
christoph
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 hintUse '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
tt <- data.frame(c(0.5, 1, 0.5))
names(tt) <- "a"
plot(tt$a, type = 'o',xlim=c(0,4))
__________________________________________________________
James Holtman "What is the problem you are trying to solve?"
Executive Technical Consultant -- Office of Technology, Convergys
james.holtman at convergys.com
+1 (513) 723-2929
Christoph Lehmann
<christoph.lehmann at gm To: r-help at
stat.math.ethz.ch
x.ch> cc:
Sent by: Subject: [R] plot question
r-help-bounces at stat.m
ath.ethz.ch
03/03/2005 11:29
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
christoph
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
On Thu, 2005-03-03 at 10:44 -0600, Marc Schwartz wrote:> See ?par for more information.Correction, that should have been ?plot.default for more information, though ?par has other relevant information on plot parameters as well. Marc
On Mar 3, 2005, at 5:29 PM, 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 sideWhat about: plot(tt$a, type = 'o',xlim=c(0,4)) HTH Remo