[R] Information

David Winsemius dwinsemius at comcast.net
Fri Jan 21 22:07:04 CET 2011


On Jan 21, 2011, at 2:59 PM, Akash wrote:

> Hello
>
> I am student of Bioinformatics and I am doin somework in R in which  
> some
> problem occurs. So Please help me to solve these problems.
> I have two problems:
>
> 1. How to generate a graph in which there are 8 rows and 20 columns  
> are
> present?
> 2. And how to put some title in the end of the graph i.e for example  
> after
> generating the rows if I want to give the name in the end of those  
> rows like
> 1,2,3...8.. how can I do this thing?

matplot will let you specify the plotting character with the pch  
argument. Coloring is also available and legends are reasonably simple  
as well.

?matplot
?legend

If you had presented data with the dput() function I would have  
returned working code, But I have gotten tired of making up examples  
when people don't post their own sample data.

-- 
David.
>
> Right now I am using this code.
>
> graph<- function(X)
> {
> for(j in 1:8)
>  {
>  for(k in 1:20)
>    {
>    xx<-((j-1)*10)
>    rect(xx,y(j,k-1,X),(xx)+10,y(j,k,X), col=colmap[k])
>    if ( X[k,j] != 0)
>      {
>       text( (xx+5),(y(j,k-1,X) + round(X[k,j])/2), a[k])
>      }
>     }
>  }
> }
>
> plot(c(0,10*8),c(0,abc), col="white")
>
> where "a" is sumthing which I have to put inside of those rows and  
> columns
>
>
> Looking for your positive reply.
>
> Thanking You
>
> With Regards
> Akash
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list