Re: [R] qq plot issue with ab line

2020-02-28 Thread Jim Lemon
Hi Ana, I should clarify what I wrote in the previous email. You are expecting an approximately square plot with a line running at about an angle of 45 degrees from lower left to upper right. However, the range of x and y values that you are plotting are not approximately equal. This means that lin

Re: [R] qq plot issue with ab line

2020-02-28 Thread Jim Lemon
Hi Ana, I'll do my best. In the attached image, I have placed two green disks at (0,0) and (1,1). These points are on a line with intercept 0 and slope 1 as are all the other points on that line. When you ask for an abline with two unnamed arguments, the first is the intercept and the second is the

Re: [R] qq plot issue with ab line

2020-02-28 Thread Ana Marija
Hi Jim, I have in my code: abline(0,1,col='red') can you please tell me how to change my code to have it indeed running from 0 to 1? Thanks Ana On Fri, Feb 28, 2020 at 3:34 PM Jim Lemon wrote: > > Hi Ana, > Look carefully at that red line. It goes through (0,0) and scoots off > the plot at (2.

Re: [R] qq plot issue with ab line

2020-02-28 Thread Jim Lemon
Hi Ana, Look carefully at that red line. It goes through (0,0) and scoots off the plot at (2.5,2.5). As you have specified that intercept and slope in your code, poor abline is doing the best it can. Do not punish it for doing what you request. Jim On Sat, Feb 29, 2020 at 6:10 AM Ana Marija wrot

[R] qq plot issue with ab line

2020-02-28 Thread Ana Marija
Hello, I made the plot in attach with this function: qqunif = function(p, BH=T, MAIN = " ", SUB=" ") { nn = length(p) xx = -log10((1:nn)/(nn+1)) plot( xx, -sort(log10(p)), main = MAIN, sub= SUB, cex.sub=1.3, xlab=expression(Expected~~-log[10](italic(p))), ylab=expr