6, 2013 10:43 AM
Subject: Re: [R] Plot Matrix with Data
Hi:
I don't understand why you're truncating the duty cycle at 90 when the
data range from 15 to 150 - the effect of doing that is the set of
grey squares in the heatmap corresponding to missing values.
The reason your color scale
the colors visible in the legend in the right part are not
always visible. If for example there is a 20 value the 20 will appear and if
there is not but there is a 25 the bar will start from the 25 onwards.
I would like to thank everyone for their on going support
Regards
Alex
______
Hi ,
I would like to use ggplot2 to plot a matrix as an image.
You can copy paste the following
Data<-matrix(data=rnorm(900,80,20),nrow=30,ncol=30)
lengthOut<-5
Lengths<- 15
library(reshape2)
library(ggplot2)
tdm <- melt(Data)
ggplot(tdm, aes(x = Var2, y = Var1, fill =
factor(value)),l
1, id=c("year"))
p <- ggplot(dat2, aes(year, value, colour = variable )) + geom_line()
p
John Kane
Kingston ON Canada
> -Original Message-
> From: catalinro...@gmail.com
> Sent: Sun, 11 Nov 2012 13:41:15 +0200
> To: r-help@r-project.org
> Subject: [R]
Dear R users,
I have a problem with plot option in R.
I want to plot all columns values in a single graph and the labels of x
axis the row names. I try to use matplot option, but I have a problem with
labels and thickness. I use a very complex data with 10 columns and 406
rows.
I use this code:
>
Forgot to cc the list.
M
On Wed, Dec 14, 2011 at 12:19 PM, R. Michael Weylandt
wrote:
> It's a bit of a hack-job, but this might get you started:
>
> d <- structure(c("A", "A", "A", "B", "A", "A", "C", "C", "A", "D",
> "C", "C"), .Dim = 3:4)
>
> plot(0, type = "n", xlim = c(0,ncol(d)), ylim = c(
I may be confused, but this seems ill-defined since, in the example,
the color corresponds to a numerical value: characters are only there
as labels. Do you intend to map the characters onto some numerical
spectrum? If so, how?
As a side note, one of the best places to get visualization ideas in
m
Hi, I am looking for options to plot the following type of matrices:
"A" "B" "C" "D"
"A" "A" "C" "C"
"A" "A" "A" "C"
as a image like this: http://www.phaget4.org/R/image002.jpg
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
See ?matplot
On Tue, Nov 11, 2008 at 10:31 AM, mentor_ <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I would like to plot the rows of a matrix.
> Is there a better way as doing it in the following way?:
>
> plot(matrix[1,], type="l")
> for (i in 2:dim(matrix)[1]) {
>lines(matrix[i,], type="l")
>
Hi,
I would like to plot the rows of a matrix.
Is there a better way as doing it in the following way?:
plot(matrix[1,], type="l")
for (i in 2:dim(matrix)[1]) {
lines(matrix[i,], type="l")
}
Cheers
--
View this message in context:
http://www.nabble.com/Plot-matrix-tp20438584p20438584.
Try this:
matplot(t(m), type='l', lty = 'solid', col='black')
On 6/6/08, Alberto Monteiro <[EMAIL PROTECTED]> wrote:
>
> Suppose that I have a matrix like:
>
> m <- rbind(c(1,2,3,4), c(2,3,2,1))
>
> Is there any way to efficiently plot the _lines_ as if
> I was doing:
>
> plot(m[1,], type="l")
On 6/6/2008 3:01 PM, Alberto Monteiro wrote:
Suppose that I have a matrix like:
m <- rbind(c(1,2,3,4), c(2,3,2,1))
Is there any way to efficiently plot the _lines_ as if
I was doing:
plot(m[1,], type="l")
points(m[2,], type="l", col="red")
(of course, in the "real world" there much more than
Suppose that I have a matrix like:
m <- rbind(c(1,2,3,4), c(2,3,2,1))
Is there any way to efficiently plot the _lines_ as if
I was doing:
plot(m[1,], type="l")
points(m[2,], type="l", col="red")
(of course, in the "real world" there much more than
just 2 lines and 4 columns...)
Alberto Monteir
transpose the matrix and then use 'matplot'
On 2/14/08, Marek Bartkuhn <[EMAIL PROTECTED]> wrote:
> Dear R users,
>
>
> I like to plot a matrix A which looks like this:
>
>
>,1 ,2 ,3 ,4
>
> 1, 1 10 100 1000
Dear R users,
I like to plot a matrix A which looks like this:
,1 ,2 ,3 ,4
1, 1 10 100 1000
2, 0.5 0.2 1.0 4.3
3, 0.1 0.2 0.3
15 matches
Mail list logo