Re: [R] Plot a matrix

2018-11-01 Thread David L Carlson
pages to understand what we are doing: ?read.table ?rownames ?as.dist ?dput ?as.numeric ?attributes ?dist ?plot ?Extract (to understand what the "$" is all about. David L Carlson Department of Anthropology Texas A&M University College Station,

Re: [R] Plot a matrix

2018-10-31 Thread Jim Lemon
Hi Myriam, This may not be the ideal way to do this, but I think it works: mcdf<-read.table(text="41540 41540 41442 41599 41709 41823 41806 41837 41898 41848 41442 0.001 41599 0.002 0.001 41709 0.004 0.003 0.003 41823 0.002 0.001 0.002 0.001 41806 0.004 0.004 0.005 0.006 0.005 41837 0.004 0.004 0.

[R] Plot a matrix

2018-10-31 Thread Myriam Croze
Hello! I need your help to plot my data. I have a file .csv which looks like that: 41540 41540 41442 41599 41709 41823 41806 41837 41898 41848 41442 0.001 41599 0.002 0.001 41709 0.004 0.003 0.003 41823 0.002 0.001 0.002 0.001 41806 0.004 0.004 0.005 0.006 0.005 41837 0.004 0.004 0.005 0.006 0.00

Re: [R] Plot a Matrix as an Image with ggplot

2013-02-18 Thread Alaios
You are good! Many thanks Alex From: Dennis Murphy Cc: R help Sent: Saturday, February 16, 2013 3:11 AM Subject: Re: [R] Plot a Matrix as an Image with ggplot Hi: See if the following works for you: library(reshape2) library(ggplot2) tdm <- m

Re: [R] Plot a Matrix as an Image with ggplot

2013-02-15 Thread Dennis Murphy
advanec for your help > Regards > Alex > > > - Original Message - > From: Dennis Murphy > To: Alaios > Cc: > Sent: Friday, February 15, 2013 10:19 AM > Subject: Re: [R] Plot a Matrix as an Image with ggplot > > Your aesthetic is fill, not color

Re: [R] Plot a Matrix as an Image with ggplot

2013-02-15 Thread Alaios
k you in advanec for your help Regards Alex - Original Message - From: Dennis Murphy To: Alaios Cc: Sent: Friday, February 15, 2013 10:19 AM Subject: Re: [R] Plot a Matrix as an Image with ggplot Your aesthetic is fill, not color. Change scale_color_gradient to scale_fill_gradient and you&

Re: [R] Plot a Matrix as an Image with ggplot

2013-02-14 Thread Alaios
ot;MHz") + ylab("Threshold") +    geom_raster() but this did not affect colorbar entries. b. reduce/remove the grayish border that appears between the legend and the image plot Could you please help me with these two? Regards Alex ____________ From: John Kan

Re: [R] Plot a Matrix as an Image with ggplot

2013-02-14 Thread John Kane
ly need to post only in text. HTML etc is automatically dropped. John Kane Kingston ON Canada > -Original Message- > From: ala...@yahoo.com > Sent: Thu, 14 Feb 2013 07:15:05 -0800 (PST) > To: r-help@r-project.org > Subject: [R] Plot a Matrix as an Image with ggplot >

[R] Plot a Matrix as an Image with ggplot

2013-02-14 Thread Alaios
Dear all, I am trying to plot a matrix I have  as an image str(matrixToPlot)  num [1:21, 1:66] 0 0 0 0 0 0 0 0 0 0 .  that contains only 0s and 1s, where the xlabel will be Labeled as str(xLabel)  num [1:66] 1e+09 1e+09 1e+09 1e+09 1e+09 ... and the yLabels will be labeled as str(yLabel)  nu

Re: [R] PLot a matrix

2012-05-06 Thread David L Carlson
L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Gabor Grothendieck > Sent: Sunday, May 06, 2012 12:16 PM > To

Re: [R] PLot a matrix

2012-05-06 Thread Gabor Grothendieck
On Sun, May 6, 2012 at 11:39 AM, Trying To learn again wrote: > Hi, > > I want to plot this matrix (I attach the data), it is suposed that each > column is a different time series. > > If I do > > g<-read.table("dataADF.txt", header=F) > > and > > plot(g[,1],type="l") > > it  plots the first colum

Re: [R] PLot a matrix

2012-05-06 Thread Sarah Goslee
You can use lines() to add additional lines to your plot. Sarah On Sun, May 6, 2012 at 11:39 AM, Trying To learn again wrote: > Hi, > > I want to plot this matrix (I attach the data), it is suposed that each > column is a different time series. > > If I do > > g<-read.table("dataADF.txt", header

[R] PLot a matrix

2012-05-06 Thread Trying To learn again
Hi, I want to plot this matrix (I attach the data), it is suposed that each column is a different time series. If I do g<-read.table("dataADF.txt", header=F) and plot(g[,1],type="l") it plots the first column plot if I want in a unique graph each colums of dataA, all in one. How should I pro

Re: [R] Plot a matrix recursively

2010-12-20 Thread AlexZolot
for data.frame: for(j in grep('Laser_', names(m)) lines(m[,j]) for matrix: for(j in grep('Laser_', colnames(m)) lines(m[,j]) or: for(j in 2:4) lines(m[,j]) Shorter could be worse if you insert additional columns later. alcesgabbo wrote: > > Hi, > > I have the following matrix (named

Re: [R] Plot a matrix recursively

2010-12-20 Thread AlexZolot
for data.frame: for(j in grep('Laser_', names(m)) lines(m[,j]) for matrix: for(j in grep('Laser_', colnames(m)) lines(m[,j]) or for(j in 2:4) lines(m[,j]) Shorter could be worse if you insert additional columns later. -- View this message in context: http://r.789695.n4.nabble.com/Plot-a-m

Re: [R] Plot a matrix recursively

2010-12-01 Thread alcesgabbo
thanks! very useful -- View this message in context: http://r.789695.n4.nabble.com/Plot-a-matrix-recursively-tp3067283p3067443.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] Plot a matrix recursively

2010-12-01 Thread Roland Rau
On 12/01/2010 02:43 PM, alcesgabbo wrote: I plot the first column with the following function: plot(m[,1],type="o", xaxt="n",ylim=c(min(m[,1:length(colnames(m))])-1, max(m[,1:length(colnames(m))])+1)) for the other columns I use there functions: lines(m[,2],type=\"o\") lines(m[,3],type=\"o\")

Re: [R] Plot a matrix recursively

2010-12-01 Thread Gerrit Eichner
Take a look at ?matplot HTH, Gerrit On Wed, 1 Dec 2010, alcesgabbo wrote: Hi, I have the following matrix (named m): key sensor_date Laser_1 Laser_2 Laser_3 2010-09-30T15:00:12+02006

[R] Plot a matrix recursively

2010-12-01 Thread alcesgabbo
Hi, I have the following matrix (named m): key sensor_date Laser_1 Laser_2 Laser_3 2010-09-30T15:00:12+020063 1 2010-10-31T15:05:07+0100

[R] Plot a matrix

2010-11-30 Thread alcesgabbo
Hi, I have this MATRIX m: key index sensor1.A sensor1.B sensor2.A sensor2.B sensor3.A 2010-10-1 7:32:00 8NA 5NA 2 2010-10-3 4:33:21NA 3NA 2 1 2010-10-5 7:32:00NA 4