Re: [R] plotting multiple figures on one page

2011-03-17 Thread Jim Lemon
On 03/17/2011 07:46 AM, scarlet wrote: I am new to the R language. I am trying to plot multiple figures on one page through a loop, but the code just produce one graph on one page. Can someone show some light on what's wrong? Here is my code: library(quantreg)

Re: [R] plotting multiple figures on one page

2011-03-17 Thread scarlet
Jim, Thanks for looking into this. The c without paste works. If the rq model overrides the mfrow, I think I will have to piece together individual plots using other software. scarlet -- View this message in context:

Re: [R] plotting multiple figures on one page

2011-03-17 Thread Muhammad Rahiz
Scarlet, If the mfrow is being overridden, perhaps the rimage package might be able to piece the individual plots... -- Muhammad Rahiz Researcher DPhil Candidate (Climate Systems Policy) School of Geography the Environment University of Oxford On Thu, 17 Mar 2011, scarlet wrote: Jim,

[R] plotting multiple figures on one page

2011-03-16 Thread scarlet
I am new to the R language. I am trying to plot multiple figures on one page through a loop, but the code just produce one graph on one page. Can someone show some light on what's wrong? Here is my code: library(quantreg) tcdata-read.table(mydata.txt,header=TRUE) postscript(myfigure.ps) basins-

Re: [R] Plotting symbols and colors based upon data values

2011-03-14 Thread Peter Ehlers
On 2011-03-13 18:46, David Winsemius wrote: On Mar 13, 2011, at 8:51 PM, Mark Linderman wrote: David, thank you for your quick reply. I spent a few minutes getting your command to work with some sparse synthetic data, and then spent several hours trying to figure out why my data didn't work

Re: [R] Plotting symbols and colors based upon data values

2011-03-14 Thread Brian Diggs
On 3/13/2011 6:46 PM, David Winsemius wrote: On Mar 13, 2011, at 8:51 PM, Mark Linderman wrote: David, thank you for your quick reply. I spent a few minutes getting your command to work with some sparse synthetic data, and then spent several hours trying to figure out why my data didn't work

Re: [R] Plotting symbols and colors based upon data values

2011-03-13 Thread David Winsemius
-project.org Subject: Re: [R] Plotting symbols and colors based upon data values On Mar 12, 2011, at 7:57 PM, Mark Linderman wrote: I am new to R and am sure this is simple, but I been unable to find a solution. I have 5 columns of data labeled X, Y, A,B,C. I can easily xyplot(Y ~ X | A) but I want

Re: [R] Plotting symbols and colors based upon data values

2011-03-13 Thread Mark Linderman
0.21665005 33 cat C green 4 4 0.01201102 34 cat Bred 3 5 0.78503588 35 cat B black 2 6 0.53589896 36 cat D blue 5 -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Saturday, March 12, 2011 10:39 PM To: Mark Linderman Cc: r-help@r-project.org Subject: Re: [R

[R] Plotting symbols and colors based upon data values

2011-03-12 Thread Mark Linderman
I am new to R and am sure this is simple, but I been unable to find a solution. I have 5 columns of data labeled X, Y, A,B,C. I can easily xyplot(Y ~ X | A) but I want the colors of the symbols to be based upon the values of B and the shape of the symbols to be determined by C. There are

Re: [R] Plotting symbols and colors based upon data values

2011-03-12 Thread David Winsemius
On Mar 12, 2011, at 7:57 PM, Mark Linderman wrote: I am new to R and am sure this is simple, but I been unable to find a solution. I have 5 columns of data labeled X, Y, A,B,C. I can easily xyplot(Y ~ X | A) but I want the colors of the symbols to be based upon the values of B and the

Re: [R] Plotting Mean in plotting degree distribution

2011-03-04 Thread Gábor Csárdi
I think this would be rather something like abline(v=mean(degree(G))) Best, Gabor On Thu, Mar 3, 2011 at 8:04 PM, Scott Chamberlain scttchamberla...@gmail.com wrote: library(igraph) G - erdos.renyi.game(1000, 1/1000) # a random graph dd1 = degree.distribution(G) plot(dd1, xlab = degree,

[R] Plotting Mean in plotting degree distribution

2011-03-03 Thread kparamas
Hi, I am plotting degree distribution of a graph using the function, library(igraph) dd1 = degree.distribution(G) plot(dd1, xlab = degree, ylab=frequency) I would like to plot the mean of the distribution as a vertical line in the attached plot. Please let me know how to do this. Thanks,

Re: [R] Plotting Mean in plotting degree distribution

2011-03-03 Thread Scott Chamberlain
library(igraph) G - erdos.renyi.game(1000, 1/1000) # a random graph dd1 = degree.distribution(G) plot(dd1, xlab = degree, ylab=frequency) abline(h = mean(dd1)) # the mean would be a horizontal line On Thursday, March 3, 2011 at 4:43 PM, kparamas wrote: Hi, I am plotting degree

[R] Plotting a 3D histogram

2011-03-01 Thread Robert A'gata
Hi - I am wondering if there is any package that does plotting of joint histogram between 2 variables, i.e. f(x,y). I found rgl but it seems not so intuitive to use. I'm wondering if there is any alternative. Thank you. Robert __ R-help@r-project.org

[R] plotting, graph, everything

2011-02-28 Thread Muzna Alvi
I have this assignment to do and after ten hours of constant trying my eyes ache and i give up.. all i'm able to get is this plot please help me these are the commands i have used till now read.table(file.choose(), sep=;, header=T) read.table(file.choose(), sep=;, header=T)-areas

Re: [R] plotting, graph, everything

2011-02-28 Thread Jannis
Hey Muzna, similar answer as to your other post. The R-list is not supposed to make your homework for you (see posting guide). You should better discuss this with the person who made the assignment. We will help you when you have concrete questions. Jannis On 02/28/2011 05:25 PM, Muzna

[R] Plotting two lines on a graph when using par(mfrow=)

2011-02-27 Thread eric
Basic question but still learning How do I plot two lines (f$equity and f$bh.equity) on one of the three graphs under mfrow ? I tried putting brackets around the first plot and lines command but that didn't work. par(mfrow=c(3,1)) {plot(f$Date,f$equity, col=blue, type=l, main=equity)

Re: [R] Plotting two lines on a graph when using par(mfrow=)

2011-02-27 Thread Joshua Wiley
Hi Eric, On Sun, Feb 27, 2011 at 10:06 AM, eric ericst...@aol.com wrote: Basic question but still learning How do I plot two lines (f$equity and f$bh.equity) on one of the three graphs under mfrow ? I tried putting brackets around the first plot and lines command but that didn't work.

Re: [R] Plotting a functional time series

2011-02-24 Thread Eduardo de Oliveira Horta
It seems the code I've sent had typos... Here's a corrected version: # x - sapply(1:10, function(i)rnorm(1000)) f - sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y) grid - density(x[,1], from=-5,to=5)$x win.graph() persp(grid, 1:10, f,theta=-50, phi=30,

[R] Plotting two time series with different frequencies

2011-02-24 Thread Gabriel Bergin
Hi, I have two time series; one of annual data and one of monthly data. How do I plot these on the same plot? I checked out ts.plot(), but it only allows for different starting times, not different frequencies. Sincerely, Gabriel Bergin gabr...@bergin.se [[alternative HTML version

Re: [R] Plotting a functional time series

2011-02-24 Thread David Winsemius
I'm not a Windows user, but if win.graph is like other output device calls, it would need a dev.off() to close it. When I do it with pdf() and close with dev.off() I get ten pages, each with a density that is consistent with what should be seen with rnorm() as input. -- David. On Feb

Re: [R] Plotting a functional time series

2011-02-24 Thread David Winsemius
On Feb 24, 2011, at 3:06 PM, Eduardo de Oliveira Horta wrote: It seems the code I've sent had typos... Here's a corrected version: # x - sapply(1:10, function(i)rnorm(1000)) f - sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y) grid - density(x[,1],

Re: [R] Plotting a functional time series

2011-02-24 Thread Eduardo de Oliveira Horta
Thanks a lot! Regards, Eduardo On Thu, Feb 24, 2011 at 6:47 PM, David Winsemius dwinsem...@comcast.net wrote: On Feb 24, 2011, at 3:06 PM, Eduardo de Oliveira Horta wrote: It seems the code I've sent had typos... Here's a corrected version: # x -

Re: [R] Plotting two time series with different frequencies

2011-02-24 Thread Gabor Grothendieck
On Thu, Feb 24, 2011 at 3:13 PM, Gabriel Bergin gabr...@bergin.se wrote: Hi, I have two time series; one of annual data and one of monthly data. How do I plot these on the same plot? I checked out ts.plot(), but it only allows for different starting times, not different frequencies. Try

Re: [R] Plotting individual trajectories from individual growth model

2011-02-23 Thread dadrivr
Thanks guys, I had to change two things to get it to work: 1. As Dennis pointed out, all of the variables in the model had to be variable names in the preds data frame. 2. I had to use na.pass in the following statement to be able to merge the predicted values with the preds data frame because

Re: [R] Plotting individual trajectories from individual growth model

2011-02-22 Thread dadrivr
Thanks Dennis, The code works for perfectly for the data in the example. For some reason, however, I get the following error message when I use a different data set: preds - expand.grid(age = c(30,36,42), Subject = unique(mydata$id)) predict(lmemodel, preds, na.action=na.omit) Error in

Re: [R] Plotting individual trajectories from individual growth model

2011-02-22 Thread Douglas Bates
On Mon, Feb 21, 2011 at 10:06 PM, dadrivr dadr...@gmail.com wrote: Thanks Dennis, The code works for perfectly for the data in the example.  For some reason, however, I get the following error message when I use a different data set: preds - expand.grid(age = c(30,36,42), Subject =

Re: [R] Plotting individual trajectories from individual growth model

2011-02-21 Thread dadrivr
Hi Dennis, That's very helpful. The plot appears appears to be of the data and not the fitted linear trajectories, however, as the lines are not linear. Is it possible to plot the fitted linear trajectories (according to the fixed/random intercepts and slopes of the lme model)? Thanks again!

[R] Plotting a functional time series

2011-02-21 Thread Eduardo de Oliveira Horta
Hello, I'm willing to plot a sequence of densities on a 3d graph, something like - x - sapply(1:10, function(i)rnorm(1000)) f - sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y) grid - density(x[,1], from=-5,to=5)$x

[R] Plotting individual trajectories from individual growth model

2011-02-20 Thread dadrivr
Hi all, I am trying to plot the fitted trajectories for each individual from an individual growth model (fit with a linear mixed effects model in lme). How can I plot each person's trajectory in the *same* panel, along with the mean-level trajectory? Below is an image of a plot similar to what

Re: [R] Plotting individual trajectories from individual growth model

2011-02-20 Thread Dennis Murphy
Hi: These are sometimes called 'spaghetti plots'; here is a variation on an example in the ggplot2 book by Hadley Wickham using the Oxboys data from package nlme: library(ggplot2) data('Oxboys', package = 'nlme') g - ggplot(Oxboys, aes(x = age, y = height)) g + geom_line(aes(group = Subject)) +

Re: [R] Plotting confidence bands around regression line

2011-02-10 Thread dtholmes
Here is my primitive and computationally intensive solution to this problem. Thank you to Michal (see above) for making me aware of the nice polygon function. I am sure that there are better solutions but this one works for me at work and for publication.

[R] Plotting Chinese characters

2011-02-08 Thread apepe
Hi, I have read some of the documentation relative to character encodings and non-standard fonts (including previous answered questions and the 2006-2 R issue), but I am still struggling with very basic plotting of Chinese text. I am using R for Mac OS X GUI 1.35-dev Leopard build 32-bit. I

Re: [R] Plotting Chinese characters

2011-02-08 Thread Prof Brian Ripley
On Tue, 8 Feb 2011, apepe wrote: Hi, I have read some of the documentation relative to character encodings and non-standard fonts (including previous answered questions and the 2006-2 R issue), but I am still struggling with very basic plotting of Chinese text. I am using R for Mac OS X GUI

Re: [R] Plotting Chinese characters

2011-02-08 Thread apepe
Prof Brian Ripley wrote: Well, no, it doesn't (it plots on the screen device). So exactly how are you producing the plot? I am trying to produce a visualization of the character network, like this: plot(g, layout=layout.fruchterman.reingold, vertex.color=black, vertex.size=2.0,

[R] Plotting accumulated data

2011-01-28 Thread Ottar Kvindesland
Hello all I have the data frame with this: ID DATETIME TRN TRN_S 1 1192756 2010-06-23 15:39:07 13.420 0.2236667 2 1192757 2010-06-23 15:40:07 13.805 0.2300833 3 1192758 2010-06-23 15:41:07 13.860 0.231 4 1192759 2010-06-23 15:42:07 13.750 0.2291667 5

Re: [R] Plotting accumulated data

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 3:07 PM, Ottar Kvindesland wrote: Hello all I have the data frame with this: ID DATETIME TRN TRN_S 1 1192756 2010-06-23 15:39:07 13.420 0.2236667 2 1192757 2010-06-23 15:40:07 13.805 0.2300833 3 1192758 2010-06-23 15:41:07 13.860

[R] Plotting by factor with xts

2011-01-22 Thread Nick Torenvliet
Hi all, I've got an xts time series of stock symbols and closing prices. head(x) symbol close 2010-01-04 AFB 13.46 2010-01-04 AKP 12.80 2010-01-04 APX 8.78 2010-01-04 AYN 13.15 2010-01-04 BAF 13.50 2010-01-04 BBF 12.86 tail(x) symbol close 2011-01-21 VMO 12.35

[R] Plotting multiple xts/zoo time series on a single plot.

2011-01-22 Thread Nick Torenvliet
So I've got a 154 column wide xts time series object and I want to plot the 154 series on a single plot and have the added benefit of the time series dates on the x axis. Any suggestions for plotting functions, maplot works but does not give dates on the axis and I can't seem to get plot to give

Re: [R] Plotting multiple xts/zoo time series on a single plot.

2011-01-22 Thread Joshua Ulrich
See ?plot.zoo, specifically plot.type=single. -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Sat, Jan 22, 2011 at 8:02 PM, Nick Torenvliet nick.torenvl...@gmail.com wrote: So I've got a 154 column wide xts time series object and I want to plot the 154 series on a single plot and

Re: [R] Plotting by factor with xts

2011-01-22 Thread Gabor Grothendieck
On Sat, Jan 22, 2011 at 12:46 PM, Nick Torenvliet nick.torenvl...@gmail.com wrote: Hi all, I've got an xts time series of stock symbols and closing prices. head(x)           symbol close 2010-01-04 AFB  13.46 2010-01-04 AKP  12.80 2010-01-04 APX   8.78 2010-01-04 AYN  13.15 2010-01-04

[R] Plotting dendrogram upside-down/mirrored

2011-01-18 Thread Nathan S. Watson-Haigh
I understand that plot.dendrogram() plots a dendrogram vertically, so the root is to the left and leaves to the right. I also understand that the horiz=TRUE option plots it horizontally so the root it at the top and the leaves at the bottom. My question is can these be plotted so the root is

Re: [R] Plotting Factors -- Sorting x-axis

2011-01-07 Thread Bill.Venables
: 07 January 2011 09:13 To: 'r-h...@stat.math.ethz.ch' Subject: [R] Plotting Factors -- Sorting x-axis Hello; How do I plot these data in R without the Months being ordered alphabetically? Months Prec 1 Jan 102.1 2 Feb69.7 3 Mar44.7 4 Apr32.1 5 May24.0 6

[R] Plotting Factors -- Sorting x-axis

2011-01-06 Thread Taylor, Eric HLS:EX
Hello; How do I plot these data in R without the Months being ordered alphabetically? Months Prec 1 Jan 102.1 2 Feb69.7 3 Mar44.7 4 Apr32.1 5 May24.0 6 Jun18.7 7 Jul14.0 8 Aug20.0 9 Sep32.4 10Oct58.9 11Nov

Re: [R] Plotting Factors -- Sorting x-axis

2011-01-06 Thread David Winsemius
On Jan 6, 2011, at 6:13 PM, Taylor, Eric HLS:EX wrote: Hello; How do I plot these data in R without the Months being ordered alphabetically? Months Prec 1 Jan 102.1 2 Feb69.7 3 Mar44.7 4 Apr32.1 5 May24.0 6 Jun18.7 7 Jul14.0 8

[R] Plotting colour-coded points

2011-01-05 Thread ANJAN PURKAYASTHA
Hi, I have a file of the following type: idab 1 0.5 5 2 0.7 15 3 1.6 7 40.5 25 I would like to plot the data in column a on the y-axis and the corresponding data in column id on the x-axis, so plot(a~id). However I would like to

Re: [R] Plotting colour-coded points

2011-01-05 Thread Jorge Ivan Velez
Hi Anjan, Try something along the lines of d$bb - with(d, cut(b, c(0,9,19,29))) with(d, plot(a, id, col = bb, pch = 16, las = 1)) legend('topright', as.character(levels(d$bb)), col = 1:length(levels(d$bb)), ncol = 3, pch = 16) where 'd' is your original data.frame. HTH, Jorge On Wed, Jan 5,

Re: [R] Plotting colour-coded points

2011-01-05 Thread David Winsemius
On Jan 5, 2011, at 2:00 PM, ANJAN PURKAYASTHA wrote: Hi, I have a file of the following type: idab 1 0.5 5 2 0.7 15 3 1.6 7 40.5 25 I would like to plot the data in column a on the y-axis and the corresponding data in column id

Re: [R] Plotting colour-coded points

2011-01-05 Thread John Kane
With xx as your data.frame library(ggplot2) qplot(a, id, data=xx, color=b) --- On Wed, 1/5/11, ANJAN PURKAYASTHA anjan.purkayas...@gmail.com wrote: From: ANJAN PURKAYASTHA anjan.purkayas...@gmail.com Subject: [R] Plotting colour-coded points To: r-help@r-project.org Received: Wednesday

[R] Plotting 3d surfaces

2010-12-09 Thread Uwe Wolfram
Dear Subscribers, I am using R for quite a while nowadays on Ubuntu 10.04 LTS. I a using R for doing my statistics. Furthermore I am using it as a tool to generate the graphics for my publications. I am currently working on a project which involves nls-fits of three dimensional surfaces such as

Re: [R] Plotting 3d surfaces

2010-12-09 Thread Barry Rowlingson
On Thu, Dec 9, 2010 at 4:20 PM, Uwe Wolfram u...@in-chemnitz.de wrote: Dear Subscribers, I am using R for quite a while nowadays on Ubuntu 10.04 LTS. I a using R for doing my statistics. Furthermore I am using it as a tool to generate the graphics for my publications. I am currently working

Re: [R] Plotting 3d surfaces

2010-12-09 Thread Ben Bolker
Barry Rowlingson b.rowlingson at lancaster.ac.uk writes: On Thu, Dec 9, 2010 at 4:20 PM, Uwe Wolfram uwwo at in-chemnitz.de wrote: I am currently working on a project which involves nls-fits of three dimensional surfaces such as ellipsoids or even more complex. I have been searching R

Re: [R] Plotting 3d surfaces

2010-12-09 Thread John Fox
Dear Ben, Though still accessible through the Rcmdr, the scatter3d() function has been moved to the car package. Best, John On Thu, 9 Dec 2010 19:41:12 + (UTC) Ben Bolker bbol...@gmail.com wrote: Barry Rowlingson b.rowlingson at lancaster.ac.uk writes: On Thu, Dec 9, 2010 at 4:20

Re: [R] Plotting 3d surfaces

2010-12-09 Thread Duncan Murdoch
On 09/12/2010 11:20 AM, Uwe Wolfram wrote: Dear Subscribers, I am using R for quite a while nowadays on Ubuntu 10.04 LTS. I a using R for doing my statistics. Furthermore I am using it as a tool to generate the graphics for my publications. I am currently working on a project which involves

[R] Plotting own function

2010-12-07 Thread Tobias Schultze
Hello, I have a simple question but didn't find a solution. How do I plot a custom function. I have defined this function func - function(x) { y - exp(-0.5*((x-63.9)/23.2)^2) if(x 63.9) return(2 - y) else { return(y) } } and want

Re: [R] Plotting own function

2010-12-07 Thread jim holtman
You need to use 'ifelse' in this case since it will handle a vector and 'if' is only for single values: func - function(x) { y - exp(-0.5*((x-63.9)/23.2)^2) ifelse(x 63.9, 2 - y, y) } x = seq(-10,150,length=500) y - func(x) plot(x,y,type=l,lwd=2,col=red) On Tue, Dec 7, 2010 at

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-28 Thread JiHO
is really to add this to my R-plotting arsenal and use it in routine, not to develop something very specific for this particular application. But thank you for taking the time to reply, maybe I'll come back to this when I know more. JiHO --- http://maururu.net

[R] Plotting envelopes in spatstat

2010-11-26 Thread Neba Funwi-Gabga
Hello, Somehow I cannot control my envelope plots on Spatstat package. I would like to plot an envelope with no legend and also I would like to label the plot as such: plot(envelope(data, nsim=39, main=My K Plot, legend=FALSE, xlab=Distance) But somehow the main, legend and xlab calls do not

Re: [R] Plotting envelopes in spatstat

2010-11-26 Thread Peter Ehlers
On 2010-11-26 11:16, Neba Funwi-Gabga wrote: Hello, Somehow I cannot control my envelope plots on Spatstat package. I would like to plot an envelope with no legend and also I would like to label the plot as such: plot(envelope(data, nsim=39, main=My K Plot, legend=FALSE, xlab=Distance) This

Re: [R] plotting a timeline

2010-11-22 Thread Łukasz Ręcławowicz
2010/11/20 Marcin Gomulka mrgo...@gmail.com I'd rather do this with a dedicated package function ( like axis() ). Probably you have to write your own function, or tune up manually plot. plot(the_data$eventtime, abs(the_data$impact), type=h, frame.plot=FALSE, axes = FALSE, xlab=,ylab=,

[R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread JiHO
Hi everyone, I want to plot a 3D interpolation of the concentration of aquatic organisms. My goal would be to have the result represented as clouds with a density proportional to the abundance of organisms, so that I could fly (well, swim actually ;) ) through the scene and see the patches here

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread Duncan Murdoch
On 22/11/2010 12:51 PM, JiHO wrote: Hi everyone, I want to plot a 3D interpolation of the concentration of aquatic organisms. My goal would be to have the result represented as clouds with a density proportional to the abundance of organisms, so that I could fly (well, swim actually ;) )

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread Mike Marchywka
Date: Mon, 22 Nov 2010 13:55:13 -0500 From: murdoch.dun...@gmail.com To: jo.li...@gmail.com CC: r-h...@stat.math.ethz.ch Subject: Re: [R] Plotting a cloud/fog of variable density in rgl On 22/11/2010 12:51 PM, JiHO wrote: Hi everyone, I

Re: [R] plotting a timeline

2010-11-22 Thread Peter Ehlers
On 2010-11-20 14:26, Marcin Gomulka wrote: I was trying to recreate this kind of timeline plot: http://www.vertex42.com/ExcelArticles/create-a-timeline.html As you can see in their excel example, the events are nicely placed out on both sides of the timeline axis. AFAIK there is no function to

[R] plotting a timeline

2010-11-20 Thread Marcin Gomulka
I was trying to recreate this kind of timeline plot: http://www.vertex42.com/ExcelArticles/create-a-timeline.html As you can see in their excel example, the events are nicely placed out on both sides of the timeline axis. AFAIK there is no function to do this nicely in R-project. Furthermore,

Re: [R] Plotting number of patients at risk below survival curve

2010-11-19 Thread Dieter Menne
Thorsten Raff wrote: does anyone know of a R-package that has implemented the increasingly popular inclusion of the number of patients at risk below Kaplan-Meier curves like in http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg

Re: [R] Plotting number of patients at risk below survival curve

2010-11-19 Thread t . raff
Dear Dieter, thanks a lot, that was exactly what I was looking for. Best regards Thorsten From: Dieter Menne dieter.menne_at_menne-biomed.de Date: Fri, 19 Nov 2010 00:36:58 -0800 (PST) Thorsten Raff wrote: does anyone know of a R-package that has implemented the increasingly popular

Re: [R] Plotting number of patients at risk below survival curve

2010-11-19 Thread Frank Harrell
Use the rms package, a replacement for of Design Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Plotting-number-of-patients-at-risk-below-survival-curve-tp3048900p3050315.html Sent from the R help

[R] Help me with R plotting

2010-11-18 Thread Alaios
Hello everyone. I want some help with plots. I have some robots in an area. Every robot is placed on x,y coordinates and every robot has a power consumption of some watts. I would like to show where are the robots by showing in a map dots (where every dots is the x,y coordinate). Below that

Re: [R] Help me with R plotting

2010-11-18 Thread Tal Galili
?plot Will give a good solution #Example: set.seed(5) xx - data.frame(x = runif(50), y = runif(50), z = sample(c(1:3), 50, T)) with(xx, plot(x, y, col = z, pch = 19)) Now you can start going into how to play with the colors, and how to add ?legend to the image... Tal Contact

[R] Plotting number of patients at risk below survival curve

2010-11-18 Thread t . raff
Dear list, does anyone know of a R-package that has implemented the increasingly popular inclusion of the number of patients at risk below Kaplan-Meier curves like in http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg any hint (or negative

Re: [R] Help me with R plotting

2010-11-18 Thread Alaios
any box that will cover part of the image. Best Regards Alex --- On Thu, 11/18/10, Tal Galili tal.gal...@gmail.com wrote: From: Tal Galili tal.gal...@gmail.com Subject: Re: [R] Help me with R plotting To: Alaios ala...@yahoo.com Cc: Rhelp r-help@r-project.org Date: Thursday, November 18, 2010, 2

Re: [R] Help me with R plotting

2010-11-18 Thread baptiste Auguié
--- On Thu, 11/18/10, Tal Galili tal.gal...@gmail.com wrote: From: Tal Galili tal.gal...@gmail.com Subject: Re: [R] Help me with R plotting To: Alaios ala...@yahoo.com Cc: Rhelp r-help@r-project.org Date: Thursday, November 18, 2010, 2:13 PM ?plotWill give a good solution

Re: [R] Help me with R plotting

2010-11-18 Thread Tal Galili
: [R] Help me with R plotting To: Alaios ala...@yahoo.com Cc: Rhelp r-help@r-project.org Date: Thursday, November 18, 2010, 2:13 PM ?plot Will give a good solution #Example: set.seed(5) xx - data.frame(x = runif(50), y = runif(50), z = sample(c(1:3), 50, T)) with(xx, plot(x, y, col = z, pch

Re: [R] Help me with R plotting

2010-11-18 Thread Alaios
Thanks a lot :) nice one --- On Thu, 11/18/10, baptiste Auguié baptiste.aug...@googlemail.com wrote: From: baptiste Auguié baptiste.aug...@googlemail.com Subject: Re: [R] Help me with R plotting To: Alaios ala...@yahoo.com Cc: Rhelp r-help@r-project.org Date: Thursday, November 18, 2010, 3:34 PM

Re: [R] Plotting 2 Lines on the Same Chart

2010-11-10 Thread S Ellison
When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off. How do I control the y axis scaling? Plot them together as a multivariate series as in the examples already pointed to. ...or try plot(series1, type=l,

[R] plotting histograms/density plots in a triangular layout?

2010-11-10 Thread Karin Lagesen
Hi! I have a set of 49 pairwise comparisons that I have done. From this I would like to plot either histograms or the density plots of the values I get. Now, I can plot one histogram per comparison, but I have problems getting the output I want. When plotting like I normally would do:

Re: [R] plotting histograms/density plots in a triangular layout?

2010-11-10 Thread Phil Spector
Karin - An example would have been nice. Perhaps this will be helpful: somedat = data.frame(x=sample(1:7,1000,replace=TRUE), + y=sample(1:7,1000,replace=TRUE), + z=rnorm(1000)) somedat$grp = interaction(somedat$x,somedat$y) Now we need to

Re: [R] Plotting a grid of directly specified colours

2010-11-07 Thread Peter Davenport
All helpful suggestions: thanks loads Baptiste, Barry, Jim. image() and color2D.matplot() seem most easily adaptable for my purposes. I've copied a couple of examples below for anyone else facing the same q's. Best, Peter #color matrix cseq-seq(0,150,1) lseq-seq(0,100,1) clen-length(cseq)

Re: [R] Plotting a grid of directly specified colours

2010-11-05 Thread Jim Lemon
On 11/05/2010 03:00 AM, Peter Davenport wrote: Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes? In other words I'm looking for a heatmap() or image()-like function to which I can specify the colour of each

[R] Plotting a grid of directly specified colours

2010-11-04 Thread Peter Davenport
Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes? In other words I'm looking for a heatmap() or image()-like function to which I can specify the colour of each grid location directly, rather than providing a

Re: [R] Plotting a grid of directly specified colours

2010-11-04 Thread baptiste Auguié
Hi, try this, library(grid) grid.raster(matrix(colors(),ncol=50),interp=F) HTH, baptiste On Nov 4, 2010, at 5:00 PM, Peter Davenport wrote: Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes? In

Re: [R] Plotting a grid of directly specified colours

2010-11-04 Thread Barry Rowlingson
On Thu, Nov 4, 2010 at 4:00 PM, Peter Davenport pwdavenp...@gmail.com wrote: Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes?  In other words I'm looking for a heatmap() or image()-like function to which

[R] Plotting a vector data

2010-11-04 Thread Nasrin Pak
Hi; I have 30 data sets and I managed to take the average of a variable in each set and put them in a vector like variable(It contains NaN data as well). x- matrix( list.files(C:/updated_CFL_Rad_files/2007/11,full=TRUE)) for(i in 1:30) { radiation.data -read.table(x[i], header = TRUE,sep = ,,

[R] plotting time series for particular months!

2010-11-04 Thread govindas
Hi all,  I have a matrix as given below... year month day prec 1   1980    10   1 13.4 2   1980    10   2  0.0 3   1980    10   3  0.0 4   1980    10   4  0.0 5   1980    10   5  0.0 6   1980    10   6  0.0 7   1980    10   7  0.0 8   1980    10   8  0.0 9   1980    10   9  0.0 10  1980    10 

Re: [R] Plotting a vector data

2010-11-04 Thread Tal Galili
Hi Nasrin, 1) You didn't define mean.radiation in your code (for example using mean.radiation-NULL) 2) Also, you're using attach, which is a good recipe for forgetting something in your environment which will lead into troubles. 3) You didn't define i (for example i - 1:30) Tal

Re: [R] Plotting 2 Lines on the Same Chart

2010-11-01 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.10.2010 20:30:47: Thanks. 1 more question. When I use Plot(series1) lines(series2) 1 use plot(series1) 2 read help page for plot.default if you are plotting simple scatterplot 3 pay attention to xlim and ylim parameters

[R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Jason Kwok
How do I plot two time series plots on the same chart? Thanks, Jason [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 1:41 PM, Jason Kwok jayk...@gmail.com wrote: How do I plot two time series plots on the same chart? Try this: example(plot.ts) example(ts.plot) library(zoo) example(plot.zoo) library(lattice) example(xyplot.zoo) -- Statistics Software Consulting GKX Group, GKX

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Jason Kwok
Thanks. 1 more question. When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off. How do I control the y axis scaling? Thanks, Jason On Fri, Oct 29, 2010 at 2:10 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 2:30 PM, Jason Kwok jayk...@gmail.com wrote: Thanks.  1 more question. When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off.  How do I control the y axis scaling? Plot them together as a

[R] Plotting factors in biplots

2010-10-21 Thread Alejo C.S.
Dear list, I'm trying to make a biplot, but instead of plotting the row numbers for each observation, I'd like to plot a group factor. Example: prcomp(iris[,1:4]) - PCA biplot(PCA) #this makes a nice biplot but with row names Instead of row numbers I want to plot iris[,5], which is a factor.

Re: [R] plotting Zipf and Zipf-Mandelbrot curves in R

2010-10-18 Thread Stefan Evert
Hi! Using R, I plotted a log-log plot of the frequencies in the Brown Corpus using plot(sort(file.tfl$f, decreasing=TRUE), xlab=rank, ylab=frequency, log=x,y) However, I would also like to add lines showing the curves for a Zipfian distribution and for Zipf-Mandelbrot. It's fairly

Re: [R] Plotting by Group

2010-10-14 Thread Dieter Menne
Ado wrote: My data: XYSpecies Group 0 0A1 .. A1 .. A1 I want to plot X vs Y for each species onto the same

Re: [R] Plotting Y axis labels within a loop

2010-10-13 Thread Steve Swope
Got it , thanks! From: David Winsemius [via R] [mailto:ml-node+2992845-2070125287-199...@n4.nabble.com] Sent: Tuesday, October 12, 2010 3:28 PM To: Steve Swope Subject: Re: Plotting Y axis labels within a loop On Oct 12, 2010, at 5:54 PM, Steve Swope wrote: When I plot y axis

[R] Plotting by Group

2010-10-13 Thread Adrian Hordyk
Hi all, My apologies if this is a very simple problem. I am very new to R, having worked a lot previously with Excel. I recently completed a R course with John Hoenig which introduced me to R. My data: XYSpecies Group 0 0A

[R] Plotting Y axis labels within a loop

2010-10-12 Thread Steve Swope
When I plot y axis labels with in a loop they (I) get confused. Here is some sample code: Fe-c(1.1, 4.5, 7.2, 8.8) Mn-c(9.6, 7.2, 5.3, 2.1) Cd-c(2.2, 3.4, 6.1, 3.2) FeMnCd-data.frame(Fe, Mn, Cd) par(mfrow=c(2,2)) for(i in FeMnCd)plot(i, xlab=Event,ylab=colnames(FeMnCd)[i]) The more plots per

Re: [R] Plotting Y axis labels within a loop

2010-10-12 Thread David Winsemius
On Oct 12, 2010, at 5:54 PM, Steve Swope wrote: When I plot y axis labels with in a loop they (I) get confused. Here is some sample code: Fe-c(1.1, 4.5, 7.2, 8.8) Mn-c(9.6, 7.2, 5.3, 2.1) Cd-c(2.2, 3.4, 6.1, 3.2) FeMnCd-data.frame(Fe, Mn, Cd) par(mfrow=c(2,2)) for(i in FeMnCd)plot(i,

[R] plotting Zipf and Zipf-Mandelbrot curves in R

2010-10-11 Thread Joseph Sorell
Using R, I plotted a log-log plot of the frequencies in the Brown Corpus using plot(sort(file.tfl$f, decreasing=TRUE), xlab=rank, ylab=frequency, log=x,y) However, I would also like to add lines showing the curves for a Zipfian distribution and for Zipf-Mandelbrot. I have seen these in many

[R] Plotting x-axis labels perpendicular to the axis

2010-10-05 Thread ANJAN PURKAYASTHA
Hi, The following command: axis(1, at= 1:50, labels= sampleNames(data)) produces an X-axis with 50 ticks and labels drawn from the sampleNames namespace. Problem is the labels at each tick are printed parallel to the x-axis and thus run into each other. How do I specify for the labels to be

<    5   6   7   8   9   10   11   12   13   14   >