Menu

#1 heat.R: tool long to display the colorbar

open
nobody
None
5
2011-02-09
2011-02-09
No

Hi
The script heat.R seems to take ages to plot the "legend" color bar, when max intensity is large (1000000).
I just change a little my heat.R and it's OK within a second

here is the patch

Alex

alex-laptop:abi alex$ diff -w ~/Downloads/LCMStats/R/heat.R lib/heat.R
57c57
< if(exoMax>=50){
---
> if((exoMax>=50)& (exoMax<1000)){
66a67,77
> if(exoMax>=1000){
> lencolscheme=length(colscheme)
> npoints<-2000
> colidx<-round(seq(from=1,to=lencolscheme, by=lencolscheme/npoints))
> for(i in colidx){
> loopSeq=seq(exoSeq[i],exoSeq[i+1],length.out=10)
> for(j in 1: 10){
> lines(c(0,1),rep(loopSeq[j],2), col=colscheme[i],lwd=1)
> }
> }
> }

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.