Re: [R] plot question, increasing Y-axis labels

2011-03-11 Thread Jim Lemon
On 03/11/2011 05:08 AM, Mike Gibson wrote: I want to increase the number of labels on my y-axis. Here is my code: plot(fish$species, fish$fl, ylim=c(5,25), xlab=Species, ylab=Fork Length (in)) The plot is great but it only has numerical y-labes every five values (i.e. labels at 5, 10,

[R] plot question, increasing Y-axis labels

2011-03-10 Thread Mike Gibson
I want to increase the number of labels on my y-axis. Here is my code: plot(fish$species, fish$fl, ylim=c(5,25), xlab=Species, ylab=Fork Length (in)) The plot is great but it only has numerical y-labes every five values (i.e. labels at 5, 10, 15, and 25). I want R to give me the same

Re: [R] plot question, increasing Y-axis labels

2011-03-10 Thread Joshua Wiley
Hi Mike, You can use the ?axis function to add custom axes in. To prevent overwriting, you will want to suppress the default y axis in your call to plot. You can find details on the arguments and parameters in ?par (I recommend pulling it up in a way that you can search because the par

Re: [R] plot question

2010-01-04 Thread Albert-Jan Roskam
, 1/3/10, Gabor Grothendieck ggrothendi...@gmail.com wrote: From: Gabor Grothendieck ggrothendi...@gmail.com Subject: Re: [R] plot question To: Albert-Jan Roskam fo...@yahoo.com Cc: r-help@r-project.org Date: Sunday, January 3, 2010, 10:10 PM I gather that each row defines one series, right

[R] plot question

2010-01-03 Thread Albert-Jan Roskam
Hi, I am new to R so forgive me if the following query is somewhat simple.  I have a small tab-separated file with n records of glucose values, one record per day, seven measurements per day. It looks like this: date    sober    no    vm    nm    va    na    vs 20091229    NA    6.8    NA   

Re: [R] plot question

2010-01-03 Thread Gabor Grothendieck
I gather that each row defines one series, right? In that case try this: Lines - datesobernovmnmvanavs 20091229NA6.8NA2.711.72.76.2 20091230NA6.8NA2.711.72.76.2 20091231NA6.8NA2.711.72.7

Re: [R] plot question

2010-01-03 Thread Dennis Murphy
Hi: My understanding is that you want a separate plot over time of each of your repeated measures variables. If that's the case, then perhaps something along the following lines will work. Given the manufactured data set Gabor provided (g from lines), let's use the reshape package and then plot

Re: [R] Plot question

2007-12-14 Thread Marc Schwartz
On Fri, 2007-12-14 at 08:16 -0500, Alan Barnett wrote: I have some data consisting of multiple trials of an experiment with different values of an independent variable. If I run R plot(var,result) I get a scatterplot of result versus the independent variable var. If I run R

Re: [R] Plot question

2007-12-14 Thread Richard M. Heiberger
), 100, replace = TRUE) bwplot(CV ~ positioned(FV)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Barnett Sent: Friday, December 14, 2007 08:16 AM To: R-Help Subject: [R] Plot question I have some data consisting of multiple trials of an experiment

[R] plot question

2007-10-02 Thread Tiandao Li
Hello, I have a question about how to plot a series of data. The folloqing is my data matrix of n n 25p5p 2.5p 0.5p 16B-E06.g 45379 4383 5123 45 16B-E06.g 45138 4028 6249 52 16B-E06.g 48457 4267 5470 54 16B-E06.g 47740 4676 6769 48 37B-B02.g 42860 6152 19276

Re: [R] plot question

2007-10-02 Thread Eric Thompson
If I've correctly interpreted what you want, you first need to get the x values: x - colnames(n) x - as.numeric(substr(x, 1, nchar(x) - 1)) Then it seems fairly easy to use matplot to get the values with different colors for each concentration dim(x) - c(length(x), 1) matplot(x, t(n), pch = 1)

Re: [R] plot question

2007-10-02 Thread Tiandao Li
Thanks for your quick reply, Eric. I want plot colnames(n) as string on x-axis. If the regression lines don't fit the data very well, it is OK, the plot is only for quality check. On Tue, 2 Oct 2007, Eric Thompson wrote: If I've correctly interpreted what you want, you first need to get the x

Re: [R] plot question

2007-10-02 Thread Eric Thompson
Okay. If you want to customize the axis labels, you can suppress the defaults by changing the matplot call to matplot(x, t(n), pch = 1, axes = FALSE) And then adding them how you want: axis(side = 2) axis(side = 3, at = x, lab = colnames(n)) box() On 10/2/07, Tiandao Li [EMAIL PROTECTED]

Re: [R] plot question

2007-10-02 Thread Tiandao Li
However, I got the following msg. matplot(colnames(n), t(n), pch = 1, axes = FALSE) Error in plot.window(xlim, ylim, log, asp, ...) : need finite 'xlim' values In addition: Warning messages: 1: NAs introduced by coercion in: as.double.default(x) 2: no non-missing arguments to min;

Re: [R] plot question

2007-10-02 Thread Eric Thompson
But you did not use the command I suggested: you replaced x with colnames(n), which is a vector of characters. Characters such as 25p has little meaning for plotting: as.numeric(25p) [1] NA So you've tried to plot a bunch of NA's, which is why it doesn't know what limits to use for xlim. That

Re: [R] plot question

2007-10-02 Thread Tiandao Li
Hello Eric, I got it right this time. You are right, regression line is way too messy. For each gene, plot the lines connecting the points of the average intensity at different concentrations, and write gene ID at the end of line. I am new to the R graphics, any help is appreciated. On Tue,

Re: [R] plot question

2007-10-02 Thread hadley wickham
On 10/2/07, Tiandao Li [EMAIL PROTECTED] wrote: Hello, I have a question about how to plot a series of data. The folloqing is my data matrix of n n 25p5p 2.5p 0.5p 16B-E06.g 45379 4383 5123 45 16B-E06.g 45138 4028 6249 52 16B-E06.g 48457 4267 5470 54

Re: [R] plot question

2007-10-02 Thread Tiandao Li
Thanks for your help, Hadley. I want to treat concentration as factor, and the 2nd and 3rd part of codes are what I wanted. However, how to draw the lines to connect the points of average intensity of each gene at different concentrations? On Tue, 2 Oct 2007, hadley wickham wrote: On

Re: [R] plot question

2007-10-02 Thread hadley wickham
The last example does connect the points of average intensity, doesn't it? Hadley On 10/2/07, Tiandao Li [EMAIL PROTECTED] wrote: Thanks for your help, Hadley. I want to treat concentration as factor, and the 2nd and 3rd part of codes are what I wanted. However, how to draw the lines to