similar to: plot lines at 0,0 axis

Displaying 20 results from an estimated 10000 matches similar to: "plot lines at 0,0 axis"

2009 May 15
2
Additional points to scatter plot show up at wrong place
Hi everyone, I have a problem with adding points to scatter plots. The plot is drawn with the scatterplot() function from the car library: scatterplot(data[,2] ~ data[,1], data=data,smooth=F,reg.line=F,xlim=c(0.5,1),ylim=c(0.5,1),ylab="ML",xlab="Freq",cex.lab=1.9,cex.axis=1.8) after that, I draw one line with abline(0,1,col="gray20") which works perfectly fine.
2002 Aug 26
1
(CAR) Scatterplot and problems (?) with abline
Network Blitz I'm trying to generate a graph to summarize Interest Rate Parity. This involves a scatterplot of x against y where the x and y limits are set so to center the graph on 0,0 and then adding each axis line and a 45 degree line. Using CAR's scatterplot (sample code below) everything except the axes plot fine: scatterplot( Interest.Rate.Dif ~ ForPrm| profit,
2006 Oct 12
3
Extrapolated regression lines
Dear list members, When I create a simple scatterplot with a regression line (se below) the line is automatically extrapolated outside the range of data points. Why is this and how can I prevent R from extrapolating the regression line? Thank you in advance, Johan model<-lm(Herb~Para) plot(Para,Herb) abline(model)
2012 May 19
3
Q - scatterplot, plot function & trellis linear regressions???
Hi R-listers, Q1) What is the difference between the scatterplot and plot function? Q2) I am able to make a graph with the scatterplot function: scatterplot(DevelopIndex ~ Veg, + data = Turtle, + xlab = "Vegetation border (m)", + ylab = "Embryonic development index") And have been successful. But I do not know if the lines are for:
2012 Aug 14
1
Graphing question(basic)
Hi, plot(xc, yc, type="l", ylim=c(0,50), xlim=c(0,50), lwd=2, xlab="M", ylab="seconds") abline(a=-think, b=cpustime, lty="dashed", col="red") abline( 2.2, 0, lty="dashed", col = "red") This draws a response time curve an asymptote and a horizontal line. How do I draw a line from the intersection of the asymptote and
2010 Dec 22
1
problems with abline in a time line scatterplot
Hello R-Users i'm stuck with the following problem: i want to add a trend line to a scatterplot. the x axis is a time line. well it doesnt work, it seems that the function abline is not able to handle the fact, that i used the column Date as a factor. this is the script: data<-read.table('DO_hapa_all_morning.txt',header=T,as.is=2) attach(data) names(data)
2010 Feb 23
2
scatterplots in car package
Hi, using scatterplot in 'car' package. There are 4 plots to be pictured together (ignore data used): library(car) par(mfrow=c(3,1)) ts.plot(rnorm(100)) ts.plot(rnorm(100)) scatterplot(rnorm(100),rnorm(100),boxplot="",smooth=T) # scatter with non-parametric fit problem is that the last one comes 'always' separate. Is there any way to solve it?? of course can use
2004 Jul 19
3
why won't rq draw lines?
I've been trying to draw quantile linear regression lines across a scatterplot of my data using attach(forrq) plot(PREGNANT,DAY8,xlab="pregnant EPDS",ylab="postnatal EPDS",cex=.5) taus <- c(.05,.1,.25,.75,.9,.95) xx <- seq(min(PREGNANT),max(PREGNANT),100) for(tau in taus){ f <- coef(rq(DAY8~PREGNANT,tau=tau)) yy <-
2005 Jun 02
4
plot/lm/abline
Hi, when I run > plot.default(z1, z2, xlab = "x", ylab = "y", main = "xxxx", pch = "+") > abline(lm(z1 ~ z2)) then the plot is plotted perfectly (scatterplot), however, the lm() function doesnt appear on the plot. What could be wrong? (Yesterday it worked perfectly, with the lm() line.) Running R 2 on OS X. Mathias Hunsk??r Furevik Norway
2009 Mar 11
4
R-help: grep in for loop using index - doesn't work
Hi everyone I am trying to use grep in a for loop to compare a string value. It works if I use the actual index value but when I use the for loop index, it doesn't work. Any suggestions plz. Here is the code: data <- read.table(file="Sigmoid.csv", head=FALSE, sep=","); c1 <- data$V1 c2 <- data$V2 c3 <- data$V3 c1data <- data.frame(c1); c2data <-
2012 Dec 18
3
Regression line does not show on scatterplot
Hello, I have done a scatterplot and now would like to add its regression line but it does not show. Below, the code I have used. lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per) plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per) abline(lm3) I have been able to do the complete operation using the software STATISTICA but it would be great to do it with R. If you require more details
2010 Oct 01
2
How to generate scatterplot - with a twist
Hi. I would like to make a scatterplot where all of the points are evenly spaced from each other - however, they are all the same size and occupy the entire graph. For example: x = rep(c(1:10), 10) y = rep(c(10:1), each = 10) plot(x, y, pch = 0) Gives me a scatter plot with 100 square points each evenly spaced between each other. But these points don't fill up the entire space and if I try
2007 Jul 19
2
Trend lines on a scatterplot matrix
I'm using pairs() to generate a scatterplot matrix; pairs(~ Fuzzy.gray.white.ratio+Fuzzy.gw.t.score+AgeWhenTested+signal_mean.noise, data=datam,subset=status=="control",main="Controls", labels=c("G/W","Peak Separation","Age","S/N")) How can I add regression lines to the plots?
2011 Nov 23
2
lines and points in xyplot()
Given the following data, I want a scatterplot with the data points and the predictions from the regression. Sigma <- matrix(c(1,.6,1,.6), 2) mu <- c(0,0) dat <- mvrnorm(5000, mu, Sigma) x <- dat[,1] * 50 + 200 y <- dat[,2] * 50 + 200 fm <- lm(y ~ x) ### This gives the regression line, but not the data xyplot(y ~ x, type = c('g', 'p'),
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
2010 Sep 20
2
invalid 'row.names' length error when running scatterplots or plot in R Commander
Hello, I teach statistics and use R Commander for teaching. I have 2 students out of 169 that can't get scatterplots or plot to work. I have had them update packages, restart R/R Commander/their computers and even reinstall R/R Commander. One is using Windows 7 on a new pc and the other is a pc user (not sure the OS). They are both using R2.11.1 and R Commander 1.6-0. The data look like
2008 Sep 10
4
re flecting a line
Suppose x and y are numeric vectors of the same length. plot(x,y) #scatterplot lmObj1 <- lm(y~x) # best fit line abline(lmObj1) # good lmObj2 <- lm(x~y) #get best fit but with axes interchanged abline(lmObj2) # not what I want. I want the correct line, drawn on the same graph, but with # response and predictor variables interchanged One way to proceed would be to
2012 Sep 28
1
blank plot----how do I make symbols appear
Hi, I am trying to create a scatterplot, coding each point to one of 5 populations. I was successful when I did this for one set of data, yet when I try plotting other data a blank plot appears (although the axes are labelled and I can fit the regression lines from each population). I have tried a variety of things to fix this but nothing seems to work. I can plot the points if I do not
2006 Oct 31
2
Put a normal curve on plot
I would like to be able to place a normal distribution surrounding the predicted values at various places on a plot. Below is some toy code that creates a scatterplot and plots a regression line through the data. library(MASS) mu <- c(0,1) Sigma <- matrix(c(1,.8,.8,1), ncol=2) set.seed(123) x <- mvrnorm(50,mu,Sigma) plot(x) abline(lm(x[,2] ~ x[,1])) Say I want to add a normal
2009 Jul 23
2
param:qsec in ggplot2
Hii i have been trying to do a scatter plot with ggplot2, like the plot 6 here (http://had.co.nz/ggplot2/geom_point.html) .. where the points size vary with values > p + geom_point(aes <http://had.co.nz/ggplot2/aes.html>(size = qsec)) but am not sure how to setup the parameter - qsec could anyone please give some pointers on how to define that thanks Mo. [[alternative HTML