Displaying 20 results from an estimated 1262 matches for "ablines".
Did you mean:
abline
2004 Mar 08
5
abline
if I want to specify y-coordinates for the heights of horizontal lines to go across a plot.
x <- c(1,2,3,6,4,8,4,7)
y <- c(3,2,7,4,5,4,5,6)
h <- c(3,5,7)
plot(x,y)
abline(y=h)
However I got error message:
Warning message:
parameter "y" couldn't be set in high-level plot() function
(I tried abline(h=y) , it;s not what I want also)
Do u know why?
2007 Jan 12
5
Regression lines
My simpleminded understanding of simple regression is that when
plotting regression lines for x on y and y on x in the same plot, the
lines should cross each other at the respective means. But, given the
R function below, abline (lm(y~x)) works fine, but abline (lm(x~y))
does not. Why?
function () {
attach (attitude)
x <- rating
y <- learning
detach (attitude)
plot (x, y)
2004 Mar 19
5
asp=1 and aspect ratio
Hi everyone
I want a square scatterplot with abline(0,1) going exactly through the
SW and NE corners. By "square" I mean that the plotting region is
exactly square, and that the axis limits are identical.
x <- 1:20
y <- x+rep(c(-1,1),10)
lims <- range(c(x,y))
None of the following do this:
plot(x,y) ; abline(0,1) #not square
plot(x,y,asp=1);abline(0,1) #diagonal
2018 Jan 29
2
Add ablines
Good morning,
I have some problem adding ablines in Rstudio.
The lines drew by the software doesen?t match with the added values, what can I do?
pfaOK<-qcc(D[!trial], sizes=size[!trial], type="p", nsigmas=2, data.name="Polli positivi al Campylobacter")
pfaOK1<-qcc(D[!trial], sizes=size[!trial], type="p", data....
2018 Apr 06
1
Fast tau-estimator line does not appear on the plot
R-experts,
I have fitted many different lines. The fast-tau estimator (yellow line) seems strange to me?because this yellow line is not at all in agreement with the other lines (reverse slope, I mean the yellow line has a positive slope and the other ones have negative slope).
Is there something wrong in my R code ? Is it because the Y variable is 1 vector and should be a matrix ?
Here is the
2018 Mar 31
0
Fast tau-estimator line does ot appear on the plot
On 31/03/2018 11:57 AM, varin sacha via R-help wrote:
> Dear R-experts,
>
> Here below my reproducible R code. I want to add many straight lines to a plot using "abline"
> The last fit (fast Tau-estimator, color yellow) will not appear on the plot. What is going wrong ?
> Many thanks for your reply.
>
It's not quite reproducible: you forgot the line to create
2009 Oct 01
4
Color of graph
I am trying to plot a line graph for 3 or more regression lines
abline(m1)
abline(m2)
abline(m3)
Can I change the color of each line? if so how?
Thanks in advance
Ashta
[[alternative HTML version deleted]]
2010 Nov 27
1
How to add multiple ablines
Hi folks
Run;
> ToothGrowth
> attach(ToothGrowth)
> toothgrowth=lm(len~dose)
adding abline:
> abline(toothgrowth)
I got it done adding single abline.
How to add more ablines on the same diagram?
I found following thread, applying "mapply" command;
Plotting multiple ablines
http://www.mail-archive.com/r-help@r-project.org/msg51543.html
mapply(abline,
(converge$kY + tan((90-converge$kT) * pi / 180)*(-converge$kX)),
tan((90-converge$kT) * pi / 180))...
2018 Mar 31
2
Fast tau-estimator line does ot appear on the plot
Dear R-experts,
Here below my reproducible R code. I want to add many straight lines to a plot using "abline"
The last fit (fast Tau-estimator, color yellow) will not appear on the plot. What is going wrong ?
Many thanks for your reply.
##########
Y=c(2,4,5,4,3,4,2,3,56,5,4,3,4,5,6,5,4,5,34,21,12,13,12,8,9,7,43,12,19,21)
2018 Apr 07
0
Fast tau-estimator line does not appear on the plot
You need to pay attention to the documentation more closely. If you don't
know what something means, that is usually a signal that you need to study
more... in this case about the difference between an input variable and a
design (model) matrix. This is a concept from the standard linear algebra
formulation for regression equations. (Note that I have never used RobPer,
nor do I regularly
2009 Mar 24
2
Properly labeling abline with text?
The result of the code shown below is posted at the following URL:
http://n2.nabble.com/Trying-to-properly-label-abline-td2524629.html
I would like to figure out a better way to label the horizontal abline.
I tried multiplying the text y position by a scale, but this didn't always put the text in a useful position. I guess I am curious if there is a preferred procedure for labeling the
2007 Jun 21
2
abline plots at wrong abscissae after boxplot
Hi folks,
I'm using R 2.5.0 under ESS under Windows XP. (This also happens using
the Rgui application.)
I'm trying to add lines to a plot originally made with "boxplot", but
the lines appear in the wrong place. Below is a script that
illustrates the problem
# boxablinetest.R - script to show problem with abline on box plot
x <- c( 2, 2, 2, 3, 3, 3, 4, 4, 4)
y
2006 Dec 09
1
abline for intercept-only simple lm models (with and without offset)
The abline function can be used to draw the
regression line when one passes the lm object
as an argument.
However, if it's an intercept-only model,
it appears to use the intercept
as the slope of the abline:
mod <- lm(dist ~ 1, data = cars)
plot(dist ~ speed, data = cars)
abline(reg = mod) # nothing appears
This behaves as documented, but might catch
someone. Would it be an improvement
2005 Aug 03
1
abline and linearity over groups
Dear R users, please can you help me understand the behaviour of abline using function lm.
I'm trying to learn linearity over groups. So I make three groups with 10 values each:
test=data.frame(cbind(
l=c(rnorm(10,0,30),rnorm(10,100,30),rnorm(10,200,30)),
t = c(rep(0,10), rep(1,10), rep(2,10))
))
when I do:
plot(test$l~test$t)
abline(lm(test$l~test$t))
the abline is a straight line
2013 Nov 19
2
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Eric
Recordé un ejemplo rápido
## Setup up coordinate system (with x == y aspect ratio):
plot(c(-2,3), c(-1,5), type = "n", xlab = "x", ylab = "y", asp = 1)
## the x- and y-axis, and an integer grid
abline(h = 0, v = 0, col = "gray60")
text(1,0, "abline( h = 0 )", col = "gray60", adj = c(0, -.1))
abline(h = -1:5, v = -2:3, col =
2006 Jun 08
1
panel.abline and xyplot
Dear All,
I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e.
xyplot(Y ~ Z | X_1*X_2, data = df)
I want something like:
abline(v = 5) if X_1=0 and X_2 = 0
abline(v =
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
2008 Mar 11
2
(no subject)
# PROBLEM WITH ABLINE
# I have a question about a seemingly imprecise abline figure which I have
come accross now a few times.
# After reading variables a and b...
a<-c(3729,1796,1956,5177,3201,3138,4265,3042,3745,2060,5713,6811,4184,1221,4700,3171,8913,5565,5500,2428,4841,10428,11197,5946,2783,4842)
2009 Jul 28
2
xyplot, panel.abline, from, to
All,
I'm trying to truncate some lines that are added to an xyplot via
panel.abline to allow additional space for inserted text. According to
?panel.abline it seems like "from" and "to" will do the trick but it does
not work for the sample code below. Any hints much appreciated.
Cheers,
David
x = seq(1,8)
y.1 = .6*x + 3.5 + rnorm(8, 0, .5); y.2 = .4*x + 1 + rnorm(8,0,
2010 Nov 20
10
An empty grey diagram
Hi folks,
Win7 64bit
R 1.12.0
I run following command on R:-
> ToothGrowth
> attach(ToothGrowth)
> plot(dose,len)
> matrics=lm(len~dose)
> abline(metrics)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
Only a grey diagram is displayed without content
> plot(abline(metrics))
Error in int_abline(a = a, b = b, h = h, v