[R] help with plot axis
Hello i have a plot, and want the axis too be with larger writing, i found some functions but they didnt work this is my plot, and if the axis can be with bigger writing can the legend inside the plot be in same the size?? plot(femsplot, xlab='Indeks',ylab='Kødprocent', pch=22) abline(lm(femsplot), lwd=1) points(firsplot, col='green', pch=2) abline(lm(firsplot), lwd=1, col='green') points(fjersplot, col='red', pch=8) abline(lm(fjersplot), lwd=1, col='red') legend(locator(1),legend=c('90 kg','80 kg','70 kg'),pch=c(22,2,8),lwd=1, col=c('black','green','red')) i have attached the plot, so you can se it... Thank you Rina __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Help with plot(augPred()) plot(comparePred()) in nlme
Dear r-helpers, When I issue the commands plot(augPred(mcc.lme, primary = ~ mcc$age, length.out = 2, level = c (0, 1))) or plot(comparePred(mcc1.lis, mcc.lme, primary = ~ mcc$age, length.out = 2), layout = c(4, 3))) no lines are drawn. But fm1 - lme(Orthodont) plot(augPred(fm1, level = 0:1, length.out = 2)) does plot lines. augPred() and comparePredict() seem to be working correctly, as shown below augPred(mcc.lme, primary = ~ mcc$age, length.out = 2, level = c(0, 1)) mcc$age .groups score.type 1 30 1 108 original 2 30 2 103 original 3 30 396 original 4 30 484 original 5 30 5 118 original 6 30 6 110 original ... 91 30 10 101 predict.subject 92 48 10 101 predict.subject 93 30 11 109 predict.subject 94 48 11 109 predict.subject 95 30 12 122 predict.subject 96 48 12 122 predict.subject comparePred(mcc1.lis, mcc.lme, primary = ~ mcc$age, length.out = 2)) mcc$age subject score.type 1 30 1 108 original 2 30 296 original 3 30 3 110 original 4 30 4 122 original 5 30 5 103 original 6 30 6 117 original ... 671 30 10 101 mcc.lme 681 48 10 101 mcc.lme 691 30 11 109 mcc.lme 701 48 11 109 mcc.lme 711 30 12 122 mcc.lme 721 48 12 122 mcc.lme _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick RoadCharlottesville, VA 22903 Office:B011+1-434-982-4729 Lab:B019+1-434-982-4751 Fax:+1-434-982-4766 WWW:http://www.people.virginia.edu/~mk9y/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] help with plot()
Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot()
It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer [EMAIL PROTECTED] wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- = David Barron Said Business School University of Oxford Park End Street Oxford OX1 1HP __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot()
On 10/16/2006 9:44 AM, tom soyer wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? I wouldn't expect to see those messages, but you don't tell us what version of R you're using, on what platform, and don't tell us what spval looks like. I'm guessing that spval is a factor. Plotting a factor will plot a bar plot of the counts of the levels; it doesn't make sense to ask for type=l. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot()
Hi David and Duncan, Thanks for the reply. I am using R-2.4.0 for windows. All I am trying to do is follow an online tutorial ( http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html) step by step. spval is just an array of numbers. I also tried using type=1 instead of l, but got same warning message and the same bar graph. Are there any packages that I should have installed? I haven't installed any contributed package, only the base distribution. Thanks, Tom On 10/16/06, David Barron [EMAIL PROTECTED] wrote: It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer [EMAIL PROTECTED] wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- = David Barron Said Business School University of Oxford Park End Street Oxford OX1 1HP [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot()
Tom, If your text file, 'sp.txt' contains the headers used on that web page, then your read.table() function call is incorrect. Your call below presently has 'header = 0'. Use TRUE/FALSE for easier reading of code. The tutorial seems to be inconsistent with that. If your text file contains the 'Date' and 'SP500' column headers, then your SP500 data column is going to be read in as a character variable, as R will see the first entry of 'SP500' as a character value, not as a column header. This column in turn, will be coerced to a factor, resulting in the errors you are seeing, as plot.factor() will be used. You should be using: d - read.table(c:/test/sp.txt, header = TRUE) Use: str(d) to review the current structure of your data frame. That should give you some hints. HTH, Marc Schwartz On Mon, 2006-10-16 at 10:54 -0500, tom soyer wrote: Hi David and Duncan, Thanks for the reply. I am using R-2.4.0 for windows. All I am trying to do is follow an online tutorial ( http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html) step by step. spval is just an array of numbers. I also tried using type=1 instead of l, but got same warning message and the same bar graph. Are there any packages that I should have installed? I haven't installed any contributed package, only the base distribution. Thanks, Tom On 10/16/06, David Barron [EMAIL PROTECTED] wrote: It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer [EMAIL PROTECTED] wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot()
Thanks Marc. I followed your suggestion and I got R to plot the correct graph! You are absolutely correct about R switching automatically from plot() to plot.factor(). I had no idea that it would do that. It looks like having the header is very important in R. Appreciate your help very much. On 10/16/06, Marc Schwartz [EMAIL PROTECTED] wrote: Tom, If your text file, 'sp.txt' contains the headers used on that web page, then your read.table() function call is incorrect. Your call below presently has 'header = 0'. Use TRUE/FALSE for easier reading of code. The tutorial seems to be inconsistent with that. If your text file contains the 'Date' and 'SP500' column headers, then your SP500 data column is going to be read in as a character variable, as R will see the first entry of 'SP500' as a character value, not as a column header. This column in turn, will be coerced to a factor, resulting in the errors you are seeing, as plot.factor() will be used. You should be using: d - read.table(c:/test/sp.txt, header = TRUE) Use: str(d) to review the current structure of your data frame. That should give you some hints. HTH, Marc Schwartz On Mon, 2006-10-16 at 10:54 -0500, tom soyer wrote: Hi David and Duncan, Thanks for the reply. I am using R-2.4.0 for windows. All I am trying to do is follow an online tutorial ( http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html) step by step. spval is just an array of numbers. I also tried using type=1 instead of l, but got same warning message and the same bar graph. Are there any packages that I should have installed? I haven't installed any contributed package, only the base distribution. Thanks, Tom On 10/16/06, David Barron [EMAIL PROTECTED] wrote: It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer [EMAIL PROTECTED] wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter type is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter type is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: type is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Help on plot multiple plot(hexbin) in the same page
Hi Li, Sue wrote: Dear R-users, I try to plot multiple plots of hexbin in the same page. However, par does not work when hexbin is used. Neither do xlim and ylim. Any ideas? hexbin is now based on the grid package, so does not work with par(). You might want to take a look at the hexbin vignette (http://bioconductor.org/packages/1.9/bioc/vignettes/hexbin/inst/doc/hexagon_binning.pdf) and the panel.hexbinplot() function. Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 [EMAIL PROTECTED] http://www.stat.auckland.ac.nz/~paul/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Help on plot multiple plot(hexbin) in the same page
Dear R-users, I try to plot multiple plots of hexbin in the same page. However, par does not work when hexbin is used. Neither do xlim and ylim. Any ideas? Thanks, Sue [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] help with plot of prcomp object
I need to plot a prcomp object from package stats with custom symbols suitable for BW publication. My boss specifically wants filled and unfilled square, triangle, circle, inverted triangle, diamond to represent 5 brain regions of 2 types of rat. Can I specify these as a parameter? Thanks, Mark Mark W. Kimpel MD Official Business Address: Department of Psychiatry Indiana University School of Medicine PR M116 Institute of Psychiatric Research 791 Union Drive Indianapolis, IN 46202 Preferred Mailing Address: 15032 Hunter Court Westfield, IN 46074 (317) 490-5129 Work, Mobile (317) 663-0513 Home (no voice mail please) 1-(317)-536-2730 FAX __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help with plot of prcomp object
yes, see ?points for the list and details. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] help with plot hclust tree
Hello, I will really appreciate some help with the following question. let's say cor.m is a correlation coefficient matrix. tree-hclust(as.dist(1-cor.m)); plot(tree); my question is: is it possible to add the correlation coefficient information to the plot? thanks, S. Ma __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] help with plot hclust tree
[EMAIL PROTECTED] wrote: Hello, I will really appreciate some help with the following question. let's say cor.m is a correlation coefficient matrix. tree-hclust(as.dist(1-cor.m)); plot(tree); my question is: is it possible to add the correlation coefficient information to the plot? Which correlation coefficient information? By means of some visualization trick or as labels? Folks, please read the psoting guide, ask specific questions and give reproducible examples (is not of that importance in this case, but yet another example of non reproducible code). Uwe Ligges thanks, S. Ma __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html