Re: [R] Plot a matrix

2018-11-01 Thread David L Carlson
nderstand 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 University College Station, TX 77843-4352

Re: [R] Plot a matrix

2018-11-01 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

[R] Plot a matrix

2018-11-01 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

[R] plot 2D matrix of RGB values

2016-01-08 Thread Martin Batholdy via R-help
Hi, I have a 2 dimensional matrix with RGB values and would like to plot it as a two dimensional surface. I am aware of functions like image() that plot a matrix of values as a grid of coloured rectangles. But I can not directly feed in the specific color value for each of these rectangles,

Re: [R] plot 2D matrix of RGB values

2016-01-08 Thread Michael Sumner
There is ?rasterImage which can take a matrix of hex values, or a 3D array of individual colour dimension values in RGB. It's pretty low-level, used to add to an existing plot. The ancient ?image function leverages this facility if you use "useRaster = TRUE". The "raster" package (no relation),

[R] plot correlation matrix

2013-10-21 Thread Alaios
Hi all, I am having 4 vectors like Data: num [1:4, 1:32] -82.8 -81.8 -75.5 -107.6 -87.6 ...  and I want to calculate the correlation between those. Is there a graphical way in R to plot the correlations or not? I would like to thank you in advance for your help Regards Alex

Re: [R] plot correlation matrix

2013-10-21 Thread Kevin Wright
You could try the corrgram or corrplot packages. kw On Mon, Oct 21, 2013 at 9:45 AM, Alaios ala...@yahoo.com wrote: Hi all, I am having 4 vectors like Data: num [1:4, 1:32] -82.8 -81.8 -75.5 -107.6 -87.6 ... and I want to calculate the correlation between those. Is there a graphical

Re: [R] plot correlation matrix

2013-10-21 Thread Jim Lemon
On 10/22/2013 01:45 AM, Alaios wrote: Hi all, I am having 4 vectors like Data: num [1:4, 1:32] -82.8 -81.8 -75.5 -107.6 -87.6 ... and I want to calculate the correlation between those. Is there a graphical way in R to plot the correlations or not? I would like to thank you in advance for

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

2013-02-18 Thread Alaios
You are good! Many thanks Alex From: Dennis Murphy djmu...@gmail.com Cc: R help R-help@r-project.org 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

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

2013-02-15 Thread Alaios
- Original Message - From: Dennis Murphy djmu...@gmail.com To: Alaios ala...@yahoo.com 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'll get what you expect

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

2013-02-15 Thread Dennis Murphy
: 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'll get what you expect. D. On Thu, Feb 14, 2013 at 11:31 PM, Alaios ala...@yahoo.com wrote: Hi, thanks I changed slightly the code to be reproducible

[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)  

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

2013-02-14 Thread John Kane
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

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

2013-02-14 Thread Alaios
: RE: [R] Plot a Matrix as an Image with ggplot The R-help list is rather picky about what attached. None of your attachments arrived. The str() info is useful but please supply some sample data The easiest way to supply data  is to use the dput() function.  Example with your file named

[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

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 tryingtolearnag...@gmail.com 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

Re: [R] PLot a matrix

2012-05-06 Thread Gabor Grothendieck
On Sun, May 6, 2012 at 11:39 AM, Trying To learn again tryingtolearnag...@gmail.com 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

Re: [R] PLot a matrix

2012-05-06 Thread David L Carlson
-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: Trying To learn again Cc: r-help@r-project.org Subject: Re: [R] PLot a matrix On Sun, May 6, 2012 at 11:39 AM, Trying

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:

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

[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

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\) ok,

[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