Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta), lwd=0.1, xlab="Marginal Quartiles", ylab="Empirical Marginal", col="red", lty="dashed") I tried putting par(lty="dashed",lwd=0.1) before this, but this doesn't have any effect either. I'm now wondering if I am doing something wrong. Does qqplot perhaps not accept these parameters? What should I do to make the lines/points thinner? Faheem.
Please give us a reproducible example. I don't know of cdf.inv, theta, empmargdistvec, ... Why should qqplot produce lines ? If you meant to say the axis, then look under axis(). If you meant the plotting symbols, then use the pch argument as bellow. One trick would be to plot using the character '.' instead. y <- rt(200, df = 5) qqplot(y, rt(300, df = 5), pch=".") If you meant the qqline, then you can supply the lty, col argument inside qqline(). y <- rt(200, df = 5) qqnorm(y) qqline(y, col = 2, lty=3) Reading par() might be useful. Regards, Adai. -----Original Message----- From: Faheem Mitha [mailto:faheem at email.unc.edu] Sent: Tuesday, April 29, 2003 1:09 PM To: r-help at stat.math.ethz.ch Subject: [R] thick plot lines Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,th eta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta), lwd=0.1, xlab="Marginal Quartiles", ylab="Empirical Marginal", col="red", lty="dashed") I tried putting par(lty="dashed",lwd=0.1) before this, but this doesn't have any effect either. I'm now wondering if I am doing something wrong. Does qqplot perhaps not accept these parameters? What should I do to make the lines/points thinner? Faheem. ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Try the "cex" parameter. (See ?par.) Here is an example. par(mfrow=c(2,1)) plot(1,1) plot(1,1,cex=.5) Cheers, Jerome On April 28, 2003 10:08 pm, Faheem Mitha wrote:> Dear People, > > In a qqplot I am doing, I get lines/points that are very thick. I've > tried setting the lwd variable to 0.1, but it doesn't seem to have any > effect. Also, I have set the value of lty to dashed, but I still get > dots. The command looks like > > qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,th >eta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta), lwd=0.1, > xlab="Marginal Quartiles", ylab="Empirical Marginal", col="red", > lty="dashed") > > I tried putting > > par(lty="dashed",lwd=0.1) > > before this, but this doesn't have any effect either. > > I'm now wondering if I am doing something wrong. Does qqplot perhaps not > accept these parameters? What should I do to make the lines/points > thinner? > > Faheem. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
If you include 'type = "l"' (or type = "line") in the qqplot command, you'll get a line. Hope this helps, Matt -----Original Message----- From: Faheem Mitha [mailto:faheem at email.unc.edu] Sent: Tuesday, April 29, 2003 1:09 AM To: r-help at stat.math.ethz.ch Subject: [R] thick plot lines Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta, pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta), lwd=0.1, xlab="Marginal Quartiles", ylab="Empirical Marginal", col="red", lty="dashed") I tried putting par(lty="dashed",lwd=0.1) before this, but this doesn't have any effect either. I'm now wondering if I am doing something wrong. Does qqplot perhaps not accept these parameters? What should I do to make the lines/points thinner? Faheem. ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, cont... {{dropped}}
On Tue, 29 Apr 2003, Faheem Mitha wrote:> > Dear People, > > In a qqplot I am doing, I get lines/points that are very thick. I've tried > setting the lwd variable to 0.1, but it doesn't seem to have any effect. > Also, I have set the value of lty to dashed, but I still get dots. The > command looks like > > qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta,pos,size), > xlim=c(-theta,theta), ylim=c(-theta,theta), lwd=0.1, > xlab="Marginal Quartiles", ylab="Empirical Marginal", col="red", lty="dashed") > > I tried putting > > par(lty="dashed",lwd=0.1) > > before this, but this doesn't have any effect either. > > I'm now wondering if I am doing something wrong. Does qqplot perhaps not > accept these parameters? What should I do to make the lines/points > thinner?Thanks to the numerous people who replied. I stupidly did not realise that the parameters lwd and lty would not apply unless I was plotting a line. I think I assumed that the default points would turn into dashes and also become smaller or something. :-) I should have realised that line type and line width meant what they said. Excuse me, it was late at night. Adding type="line" does indeed work. I suppose that if I wanted to shrink the points I would use cex? I think I need to look at a graphing tutorial. I see the "Contributed" page has * Using R for Data Analysis and Graphics? by John Maindonald. * Statistical Computing and Graphics Course Notes? by Frank E. Harrell. Any other suggestions? Google (usually invaluable) is useless for this, since searching for "R" is not very productive. Now if it was only called SuperDuperStatPackage... Faheem.