search for: my_color

Displaying 4 results from an estimated 4 matches for "my_color".

Did you mean: my_colors
2012 Jul 29
1
Zoo panel function
...ette(rainbow(100)) mypanel_v1 = function(x, y, ...){ lines(x, y, lty=2, col='grey') points(x, y, col=mycol, pch=16) } mycol = round((y - min(y)) / (max(y) - min(y)) * 99) + 1 plot(zobj, panel=mypanel_v1) ########################################################### ## EXAMPLE 2 - PASSING IN MY_COLOR AS PARAM (WITH WARNING) ## How would I make the color argument modular? ## This works, but throws errors ## What is the best way to to this? ########################################################### palette(rainbow(100)) mypanel_v2 = function(x, y, MY_COLOR, ...){ lines(x, y, lty=2, col='grey...
2010 Apr 13
0
Coloring leaves in Dendrogram according to gene names
...erion. For me this criterion is the gene name. For this, I created a data.frame with 2 variables: The gene name and the corresponding color. Using the following function, adapted from "dendrapply {stats}", I still have the same color for the leaves. Using the standard function (with the my_colors[i]), I do have the leaves of different colors !!! The structure of "my_colors[i]" is the same as the structure of "color" !!! Do you have any idea on what is going wrong ? Many thanks for your help, targetGenes<-length(unique(bm$Target)) #Getting the number of unique ta...
2011 Aug 17
2
Lattice: problem with setting space between plot and legend
...barchart and legend. I've read the package's specification, but unfortunately I haven't spot the information how to do this. Here's the code I've written: barchart(mymatrix[,1:ncol(mymatrix)],horizontal=FALSE, box.width=1,stack=TRUE,border=FALSE,par.settings = simpleTheme(col =my_colors),lty="dotted",lend="butt",key=list(space="bottom",columns=ncol(mymatrix),points=FALSE,text=list(colnames(mymatrix)),rectangles=list(border=FALSE,size=2,col=my_colors[1:ncol(mymatrix)]),border=FALSE,rows=1,between=0.25)) Thank you for any assistance. -- View this m...
2009 Feb 02
2
Defining plot colors based on a variable
...c_data) curr_assoc <- assoc_data[CHR == 1 & BP > 500000 & BP < 1000000, ] #these criteria change based on input from another file #count the number of transcripts transcripts <- length(unique(curr_assoc$FILE)) #generate that number of unique ³FILE² entries in my subset of data my_colors <- rainbow(transcripts) plot(curr_assoc$BP, log10(curr_assoc$P)*-1, pch=20, col=c(my_colors)[curr_assoc$FILE], ylim=c(-15, 15),xaxs="i", xlab=NA, cex=0.7, cex.lab=2) detach(assoc_data) The problem is that when I plot this I only see (for example) 2 colors instead of the expected 10...