similar to: Is abline misbehaving?

Displaying 20 results from an estimated 10000 matches similar to: "Is abline misbehaving?"

2010 Sep 20
3
How to set the limit of abline (regression line of lm)
Dear List, I ran a regression model using lm and produced a regression line using abline. The line ranges from -20 to 20 in x axis, and the section I only want is from -20 to 0. Please kindly advise any function in abline () to set the range of x axes. Thank you Elaine [[alternative HTML version deleted]]
2010 May 15
3
abline limit constrain x-range how?
Hello, I managed to "linearize" my LDA decision boundaries now I would like to call abline three times but be able to specify the exact x range. I was reading the doc but it doesn't seem to support this use-case? are there alternatives. The reason why I use abline is because I first call plot to plot all the three datasets and then call abline to "append" these decision
2009 Jan 22
2
plot: abline() - define line length
Hi, is there a way to define, that a line drawn via abline() should only go from for example -2 to 1 on the x-axis (with something working similiar to xlim()) ? thanks for any help!
2006 May 24
3
Regression line limited by the rage of values
Hi In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph with a regression line spanning the whole plot . This means that the line extends beyond the swarm of data points to the defined of default plot region. With par(xpd=T) it will span the entire figure region. But how can I limit a regression line to the data range, i.e between (xmin,ymin) and (xmax,ymax)? Sorry for
2008 Feb 21
2
coloring a graph left or right of an abline
Dear R community, I would wish to color the background of my histogram differently to the left and right of an abline... Can you please help? Thankin you, Georg. **************************** Georg Ehret JHU Baltimore - USA [[alternative HTML version deleted]]
2008 Jun 19
4
Controlling the length of line with abline(lm())
Hi I just realized that when I use linear regression to draw a line through my data points with something like the following: abline(lm(y ~ x)) the length of the line is infinite, i.e., the line goes beyond the smallest and the largest data values. This seems not very right to me (not to mention it looks unaesthetic). I do not mean to imply that the straight-line behavior of my system is
2010 Aug 12
3
Median abline how-to ?
Hi, I'm newbie with R and don't really know how to add a median line to each of the groups that is not all the plot long. Here is a small working code that i have adapted for my purpose. If somebody could tell me how to draw median lines on each group and not all plot long. ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <-
2008 Apr 08
2
diagonally fill a rectangle with color gradient
Hi, Is it possible to diagonally fill a rectangle with a color gradient? I noticed that the gradient.rect of plotrix could fill a rect either up and down or from side to side. I am looking for something similar but fills diagonally instead, e.g., from the upper left corner to the bottom right. Does anyone know how to do it in R? Thanks, -- Tom [[alternative HTML version deleted]]
2007 Mar 20
5
abline within data range
Dear R helpers, I would like to have abline, for a lm model for example, lying within data range. Do you know how to get it? Thank in advance Nguyen D Nguyen #CODE x<- rnorm(200, 35,5) y<- rnorm(200, 0.87,0.12) plot(y~x, xlim=c(0,50), pch=17, bty="l") abline(lm(y~x)) # I would like abline is between min(x) and max(x) [[alternative HTML version deleted]]
2012 Dec 03
3
Histogram plot help
Dear All: I plotted a histogram with Abline, clipping with color codes but i run into some problems. The "abline' does not show up at all, and when i request the 'prob=True' (to obtain the freqs), my clipped region colors the section of the graph instead of the plot only. Is there any way i can get the y-axis figures to be in whole numbers rather than decimals? Many thanks
2007 Jan 16
3
plot portion of a line
Dear HelpeRs, Given: x <- rnorm(50) y <- rnorm(50) plot(x,y) abline(lm(x ~ y)) Is there a way to plot just a portion of the line? Say for values of x > 2.0 or x > -2.0 and x < 4.0. (Still fitting all the points.) Thank you, jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning.
2002 Jan 05
1
abline and log plots (PR#1243)
Full_Name: Stephen Eglen Version: 1.4 OS: Redhat Linux 7.1 Submission from: (NULL) (128.252.204.36) abline() produces a spurious line in addition to the correct line, at least with the X11 driver. The postscript file generated also has nan values in it, which causes an error under ghostscript. xs <- c(0, 150, 300) ys <- c(75, 40, 23) par(mfrow=c(1,2)) plot(xs,ys, log="")
2001 Sep 19
1
Bizarre clipping with abline and points (PR#1095)
I want to put some points along the horizontal axis. > plot(1:10, 1:10) > points(4, par("usr")[3], xpd=TRUE) > abline(v=5) works fine for me. But if I try > plot(1:10, 1:10) > abline(v=5) > points(4, par("usr")[3], xpd=TRUE) then the points are clipped. The call to abline seems to be enforcing xpd=FALSE for later calls to the plot. Cheers, Jonathan.
2006 Jun 02
2
plot with different color
Hi how can I plot a series of number as a line, but with lines above a threshould as one color, and with lines below the threshold as another color. for example, a numeric vector: rnorm(1:100), and plot these numbers in the original order, but lines above the horizontal line at 0 are in red, and lines below in blue? Thanks
2000 Nov 29
0
abline() AND rect() do not obey "xpd" (clipping) (PR#750)
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes: MM> This is not a bug in the very strict sense, MM> but for consistency, MM> I feel that MM> abline() MM> should obey par("xpd") setting, even by ...-argument. MM> The following code shows how lines() ``works'' and abline() does not :
2004 Jun 29
1
abline and its objects
Hi R People: Is there a way to put an abline line for its objects on a plot, please? I have an its object, ibm2, which runs from the January 2 through May 28. >ibm2 ibm 2004-01-02 91.55 2004-01-05 93.05 2004-01-06 93.06 2004-01-07 92.78 2004-01-08 93.04 2004-01-09 91.21 2004-01-12 91.55 2004-01-13 89.70 2004-01-14 90.31 2004-01-15 94.02 . . . I plot the data. No
2004 Jan 20
1
lattice: adding text between grouped panels?
How one can add a text (e.g. the labels of an axis) in a space between grouped panels which was created by using the argument ``between''? Example: data(barley) dotplot(variety ~ yield | site * year, data=barley, between=list(x=c( 0, 0, 6 )) How to add labels for the y axis in the space in the middle? Thanks Wolfram
2008 Jun 13
1
adding custom axis to image.plot() and strange clipping behavior
Hi list, I wanted to plot an image with a colorbar to the right of the plot, but set my own axis labels (text rather than numbers) to the image. I have previously accomplished this with two calls to image(), but the package 'fields' has a wrapper function, image.plot(), which does this task conveniently. However, I could not add axes to the original image after a call to image.plot(); I
2011 May 03
2
Controlling the extent of ablines on plot
Hi all, I'm attempting to make a quite-specific plot where the axes cross at the origin and with gridlines for guidance. I've been using ablines to create the reference lines because I want a lot of control as to where they are placed on the axis. This command works very well for such control. However... These ablines don't seem to work when I specify the origin as 0,0. They go
2008 Feb 22
1
Clipping using par(plt=..., xpd=FALSE) inconsistencies
Here is a demonstration of behaviour that is probably an optimization by someone far smarter than me that did not anticipate anyone wanting to do this, but for my purposes it looks more like a bug than a feature. I have tested this with R2.6.2 on Windows, no additional packages loaded (beyond the default), I have tested using the default graphics object, pdf, jpeg, and cairoDevice (ok I loaded a