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,
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.
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
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
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
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&
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
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
>
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
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
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
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
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
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
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
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
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\")
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
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
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
20 matches
Mail list logo