Re: [R] heatmap aspect ratio

2005-12-07 Thread Gregoire Thomas
You can change the code of layout:
 layout(lmat, widths = lwid, heights = lhei, respect = TRUE)
 layout(lmat, widths = lwid, heights = lhei, respect = FALSE)

(best to create a new function my.layout with the modified code)


Jacob Michaelson wrote:

Hi all,

Does anyone know of a fairly easy way to stretch a heatmap  
vertically?  I've got 42 arrays and would like to be able to see as  
many significant genes as possible (right now I can only get 50 genes  
with it still being readable).  In some comparisons there are several  
hundred significant genes.

I've fiddled with the asp argument, but that doesn't give the  
results I'm looking for -- only scales the images, not the dendrograms.

Is there any way to make the heatmap rectangular rather than square  
without hacking the heatmap function itself (which is where I'm  
headed next)?

Thanks in advance,

Jake

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

  


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] 2d plotting and colours

2005-04-07 Thread Gregoire Thomas
And does this work?
n - 5
par(mfrow = c(2,2))
palette(default)
barplot(1:25,col = 1:25)
pal - rainbow(n)
barplot(1:25,col = pal[(1:25-1)%%n+1])
pal - rgb((0:15)/15, g=0,b=0, names=paste(red,0:15,sep=.))
barplot(1:25,col = pal[(1:25-1)%%n+1])

Earl F. Glynn wrote:
Mulholland, Tom [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 

Since I was only concentrating on colour issues and not on your specific
   

problem I was just showing the possibilities.
 

Does this code help
n - 5
par(mfrow = c(2,2))
palette(default)
barplot(1:25,col = 1:25)
palette(rainbow(n))
barplot(1:25,col = 1:25)
palette(rgb((0:15)/15, g=0,b=0, names=paste(red,0:15,sep=.)))
barplot(1:25,col = 1:25)
require(cluster)
x - runif(100) * 8 + 2
cl - kmeans(x, n)
palette(rainbow(n))
plot(x, col = cl$cluster)
abline(h = cl$centers, lty = 2,col = grey )
palette(palette()[order(cl$centers)])
points(x,col = cl$cluster,pch = 20,cex = 0.4)
   

Using Windows with R 2.0.1 this looks fine at first.
But when I resize the graphic, copy the graphic to a metafile and paste it
into Word, or go to an earlier graphic and come back using History, the
colors ae all messed up.  It's as if only the last palette is being used for
all four plots in the figure.  Oddly, if I copy the graphic as a bitmap, the
colors are preseved in the bitmap.  Is this a quirk of my machine or does
this happen for others?
Is it possible that the Windows palette manager is being used (which is such
about obsolete) and that true color graphics are not being used (which is
the easist way to avoid headaches from the Windows palette manager)?
efg
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] PlotML

2004-11-29 Thread Gregoire Thomas
Dear all,
Has anybody ever written some plot / hist functions that would return 
PlotML code? [http://ptolemy.eecs.berkeley.edu/]
Regards,
Gregoire
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] PlotML

2004-11-29 Thread Gregoire Thomas

 Has anybody ever written some plot / hist functions that would return
 PlotML code? [http://ptolemy.eecs.berkeley.edu/] 
http://ptolemy.eecs.berkeley.edu/%5D

Not that I know of, and looking at the design of PlotML, it doesn't
look like a nice fit as an R device driver. PlotML works at the level
of data sets, bar graphs, axes, etc., not with low-level items like
lines, polygons, and text. There are general XML handling tools in the
XML package, though.
Thx. I've wrapped up a couple of functions into a package that does what 
I need. In case somebody is interested I've put it with an example at: 
http://penyfan.ugent.be/ptplot/ . Note that you might also need to 
install R2HTML.
Regards, Gregoire

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] hclust title and paste - messed up

2004-10-11 Thread Gregoire Thomas
paste(c(a,b,c),collapse=)
paste(a,b,c,sep=)

On Mon, 2004-10-11 at 13:40, Dan Bolser wrote:
 I use the following code to scan a (limited) parameter space of clustering
 strategies ...
 
 data - read.table(... 
 
 dataTranspose - t(data)
 
 distMeth - c(euclidean,
   maximum,
   manhattan,
   canberra,
   binary
   )
 
 clustMeth - c(ward,
  single,
  complete,
  average,
  mcquitty,
  median,
  centroid
  )
 
 par(ask=TRUE)
 
 for (d in distMeth){
   print(d)
   dt - dist(dataTranspose,method=d)
   for (m in clustMeth){
 print(m)
 hc - hclust(dt,method=m)
 plot(hc,
  main=paste(c(
Distance Measure, d,
Cluster Method, m),sep= ),
  xlab='',
  sub=''
  )
   }
 }
 
 
 However, my plot title (main) has 4 lines, when I think it should only
 have one line.
 
 What am I doing wrong?
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html