I'm not really sure what you are asking for, but I might venture to suggest a few ideas:
1) Do you mean to say you want two plots: one with ylim around -10 and the other running from 0 to 1000? 2) Are you looking for a "break" in the y-axis? If so, plotrix may be able to help, but it's hardly worth it to save about 5 units on a scale that runs spans a range >1000. 3) Would you please send your data or a minimal example that's similar? I'm really not understanding what you want to plot -- if something runs from -10 to 1000 why do you not want all those numbers in your graph? This all seems to contradict your original post: "Is there a way to leave the segment there but let the graph axis start from the origin? In this way the segment will be out of the graph" which your latest email seems to suggest you were able to do. Michael On Thu, Aug 25, 2011 at 1:30 PM, Claudio Zanettini < claudio.zanett...@gmail.com> wrote: > > I tried setting ylim=(0, 1000) >> but the segment that I have draw is at y=-10 >> so if I set the y origin to 0 I don t have the segment, >> if a l leave it at -10 I have the segment but the axis start from -10. >> >> >> I would like to have both. >> So to have a graph with ylim=( 0, 1000) >> and under it a segment parallel to the x axis at -10. >> I am sorry it is contorted thing :) >> >> Claudio >> >> >> 2011/8/25 R. Michael Weylandt <michael.weyla...@gmail.com> >> >>> "lim" is not the argument: "ylim" is. >>> >>> You put in a vector of length 2 comprising the min and max y you wish: >>> consider this: >>> >>> x = -5:5; y = x^2; z = rep(-5,11); >>> layout(1:2) >>> plot(x,y,type="b"); lines(x,z,col=2) >>> plot(x,y,ylim = c(-8,max(y)+3),type="b"); lines(x,z,col=2) >>> >>> For your work, you'd need ylim = c(0, 1.03*max(y)) or something similar. >>> >>> Michael Weylandt >>> >>> >>> On Thu, Aug 25, 2011 at 1:12 PM, Claudio Zanettini < >>> claudio.zanett...@gmail.com> wrote: >>> >>>> Yes I tried but if I set the lim to 0 then it will not displayed the >>>> line that is at -10, right? >>>> >>>> 2011/8/25 R. Michael Weylandt <michael.weyla...@gmail.com> >>>> >>>> Look at ylim, as an optional argument to plot. >>>>> >>>>> Michael >>>>> >>>>> On Thu, Aug 25, 2011 at 1:07 PM, Claudio Zanettini < >>>>> claudio.zanett...@gmail.com> wrote: >>>>> >>>>>> Hello everyone, >>>>>> I have a graph and a segment parallel to the x axis at y=-10, x=0, >>>>>> and >>>>>> bars on it. >>>>>> Now the question is, >>>>>> Is there a way to leave the segment there but let the graph axis start >>>>>> from >>>>>> the origin? >>>>>> In this way the segment will be out of the graph >>>>>> >>>>>> >>>>>> Thanks >>>>>> >>>>>> [[alternative HTML version deleted]] >>>>>> >>>>>> ______________________________________________ >>>>>> R-help@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. >>>>>> >>>>> >>>>> >>>> >>> >> > [[alternative HTML version deleted]] ______________________________________________ R-help@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.