Re: [R] rgl and axes3d() labels
Or perhaps the documentation could be updated to clear up what works and what doesn't. It seems pretty confusing to put options in the docs that do not work as described. -Alex > On Apr 24, 2014, at 4:05 AM, Duncan Murdoch wrote: > >> On 23/04/2014, 9:02 PM, Alex Reynolds wrote: >> Unfortunately, that doesn't help as it removes axis lines. It looks like >> I can't use segments3d() without knowing what the bounds are of the >> current axes and I don't know what to call to expose those. >> >> Thanks again for your help, though, I appreciate it. Hopefully this gets >> fixed in a future release! > > There is no bug, so it won't be fixed. > > Duncan Murdoch > >> >> -Alex >> >> >> On Wed, Apr 23, 2014 at 5:34 PM, Duncan Murdoch >> mailto:murdoch.dun...@gmail.com>> wrote: >> >>On 23/04/2014, 7:51 PM, Alex Reynolds wrote: >> >>I am making an rgl-based 3d plot. It works fine, except when I >>try to >>remove axis value labels and tick marks with axes3d(labels=FALSE, >>ticks=FALSE): >> >>--- >>rgl.open() >>offset <- 50 >>par3d(windowRect=c(offset, offset, 1280+offset, 1280+offset)) >>rm(offset) >>rgl.clear() >>rgl.viewpoint(theta=__thetaStart, phi=30, fov=30, zoom=1) >>spheres3d(df$PC1, df$PC2, df$PC3, radius=featureRadius, >>color=df$rColor, >>alpha=featureTransparency, shininess=featureShininess) >>aspect3d(1, 1, 1) >> >>/* -- */ >>axes3d(col='black', box=FALSE, labels=FALSE, ticks=FALSE) >>/* -- */ >> >>title3d("", "", "PCoA1", "PCoA2", "PCoA3", col='black', line=1) >>texts3d(df$PC1, df$PC2, df$PC3, text=df$ctName, color="blue", >>adj=c(0,0)) >>bg3d("white") >>rgl.clear(type='lights') >>rgl.light(-45, 20, ambient='black', diffuse='#dd', >>specular='white') >>rgl.light(60, 30, ambient='#dd', diffuse='#dd', >>specular='black') >>filename <- paste("results/PCoA.labeled.__pdf", sep="") >>rgl.postscript(filename, fmt="pdf") >>--- >> >>When I run this code, these flags are ignored and I still get >>axis labels >>and tick marks. What am I misunderstanding about the documentation? >> >> >>If you specify edges="bbox" (the default), labels is ignored, and >>the bbox3d() function is used to draw the axes. There's no ticks >>argument, so it'll be absorbed by the ... argument. >> >>I don't know what you want, but you might get it with >> >> axes3d(edges=c("x", "y", "z"), col='black', box=FALSE, >>labels=FALSE, tick=FALSE) >> >>This won't join the axis lines at the lower corner; if that's what >>you want, I'd just draw them explicitly using segments3d. >> >>BTW, mixing rgl.* functions with *3d functions is likely to give you >>strange results. I don't recommend it. >> >>Duncan Murdoch > __ R-help@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.
Re: [R] rgl and axes3d() labels
Unfortunately, that doesn't help as it removes axis lines. It looks like I can't use segments3d() without knowing what the bounds are of the current axes and I don't know what to call to expose those. Thanks again for your help, though, I appreciate it. Hopefully this gets fixed in a future release! -Alex On Wed, Apr 23, 2014 at 5:34 PM, Duncan Murdoch wrote: > On 23/04/2014, 7:51 PM, Alex Reynolds wrote: > >> I am making an rgl-based 3d plot. It works fine, except when I try to >> remove axis value labels and tick marks with axes3d(labels=FALSE, >> ticks=FALSE): >> >> --- >> rgl.open() >> offset <- 50 >> par3d(windowRect=c(offset, offset, 1280+offset, 1280+offset)) >> rm(offset) >> rgl.clear() >> rgl.viewpoint(theta=thetaStart, phi=30, fov=30, zoom=1) >> spheres3d(df$PC1, df$PC2, df$PC3, radius=featureRadius, color=df$rColor, >> alpha=featureTransparency, shininess=featureShininess) >> aspect3d(1, 1, 1) >> >> /* -- */ >> axes3d(col='black', box=FALSE, labels=FALSE, ticks=FALSE) >> /* -- */ >> >> title3d("", "", "PCoA1", "PCoA2", "PCoA3", col='black', line=1) >> texts3d(df$PC1, df$PC2, df$PC3, text=df$ctName, color="blue", adj=c(0,0)) >> bg3d("white") >> rgl.clear(type='lights') >> rgl.light(-45, 20, ambient='black', diffuse='#dd', specular='white') >> rgl.light(60, 30, ambient='#dd', diffuse='#dd', specular='black') >> filename <- paste("results/PCoA.labeled.pdf", sep="") >> rgl.postscript(filename, fmt="pdf") >> --- >> >> When I run this code, these flags are ignored and I still get axis labels >> and tick marks. What am I misunderstanding about the documentation? >> >> > If you specify edges="bbox" (the default), labels is ignored, and the > bbox3d() function is used to draw the axes. There's no ticks argument, so > it'll be absorbed by the ... argument. > > I don't know what you want, but you might get it with > > axes3d(edges=c("x", "y", "z"), col='black', box=FALSE, labels=FALSE, > tick=FALSE) > > This won't join the axis lines at the lower corner; if that's what you > want, I'd just draw them explicitly using segments3d. > > BTW, mixing rgl.* functions with *3d functions is likely to give you > strange results. I don't recommend it. > > Duncan Murdoch > [[alternative HTML version deleted]] __ R-help@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.
[R] rgl and axes3d() labels
I am making an rgl-based 3d plot. It works fine, except when I try to remove axis value labels and tick marks with axes3d(labels=FALSE, ticks=FALSE): --- rgl.open() offset <- 50 par3d(windowRect=c(offset, offset, 1280+offset, 1280+offset)) rm(offset) rgl.clear() rgl.viewpoint(theta=thetaStart, phi=30, fov=30, zoom=1) spheres3d(df$PC1, df$PC2, df$PC3, radius=featureRadius, color=df$rColor, alpha=featureTransparency, shininess=featureShininess) aspect3d(1, 1, 1) /* -- */ axes3d(col='black', box=FALSE, labels=FALSE, ticks=FALSE) /* -- */ title3d("", "", "PCoA1", "PCoA2", "PCoA3", col='black', line=1) texts3d(df$PC1, df$PC2, df$PC3, text=df$ctName, color="blue", adj=c(0,0)) bg3d("white") rgl.clear(type='lights') rgl.light(-45, 20, ambient='black', diffuse='#dd', specular='white') rgl.light(60, 30, ambient='#dd', diffuse='#dd', specular='black') filename <- paste("results/PCoA.labeled.pdf", sep="") rgl.postscript(filename, fmt="pdf") --- When I run this code, these flags are ignored and I still get axis labels and tick marks. What am I misunderstanding about the documentation? Thanks, Alex [[alternative HTML version deleted]] __ R-help@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.
[R] Color bins for lattice levelplot
I am creating a levelplot figure with the following code. This should be repeatable code, which includes a link to the data I am working with. --- pdfFn <- "foo.pdf" df <- read.table("http://dl.dropbox.com/u/31495717/stackoverflow.overlaps.list.txt";, sep="\t", header=FALSE) names(df) <- c("x", "y", "level") df$level <- round(df$level*100, 0) # reorder cell type row-factors (in reverse of given order) df$y <- factor(df$y, levels=unique(df$y[length(df$y):1])) lowestValue <- min(df$level) secondHighestValue <- unique(sort(df$level, decreasing=TRUE))[2] numberOfColorBins <- 10 col.seq <- seq(lowestValue, secondHighestValue, length.out=numberOfColorBins) brks <- c(0, col.seq, Inf) cuts <- cut(df$level, breaks=brks) colors <- colorRampPalette(c("white", "red"))(length(levels(cuts))-1) colors <- c(colors, "black") cls <- rep(colors, times=table(cuts)) library(lattice) trellis.device(dev=pdf, file=pdfFn) fig <- levelplot(cuts~x*y, data=df, cuts=numberOfColorBins, col.regions=cls, xlab="", ylab="", aspect="iso", scales=list( x=list(rot=90) ), panel=function(...) { arg <- list(...) panel.levelplot(...) panel.text(df$x, df$y, df$level, cex=0.5) }, colorkey=list(col=colorRampPalette(c("white", "red"))(length(col.seq)), at=col.seq) ) print(fig) graphics.off() --- For reference, here is what the graph ("foo.pdf") looks like: * http://twitpic.com/7z9u2c Please note, in this example, the diagonal of black cells (representing cells with a level of "100"). The variable 'numberOfColorBins' defines the number of gradients between white and red, for values between the minimum level, and the second-highest level. If I adjust the variable 'numberOfColorBins' from the current 10 to some value 16 or greater, then the diagonal of black cells (values of "100") turns into a diagonal of red cells. Because I define red cells as between (in this example) the minimum of "14" and the second-highest maximum "79", values of "100" should always be black. My question is: If I have 16 or more color bins between white and red, inclusive, then cells that were colored black are now colored red, which is incorrect. How can I increase the number of color bins between white and red, while keeping black cells black? Thanks for any advice. Regards, Alex __ R-help@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.
[R] levelplot + cut() for custom color palette
I have the following data as input, from which I would like to make a lattice levelplot: - x y level 1 m3134 m3134 1.000 2 m3134 m416B 0.4189057 3 m416B m3134 0.2696508 4 m3134 mA20 0.3322170 5 mA20 m3134 0.2454191 6 m3134mB 0.3176792 ... - I transform the levels as follows, so that levels are in the range [0,100]: - x y level 1 m3134 m3134 100 2 m3134 m416B42 3 m416B m313427 4 m3134 mA2033 5 mA20 m313425 6 m3134mB32 ... - I want to create a custom color palette with the following groups, based on the levels in my input data frame mostly being between 10 and 80: level range -- color - [0,10) -- white [10, 11) -- white [11, 12) -- a mix of mostly white and a little red ... [78,79) -- a mix of mostly red and a little white [79,80) -- red [80, Inf) -- black In other words, I want to color any cell with the level of 100 (or greater than 80) with black, and any cell with a level between 0 and 80 with a color between white and red. Here is my code: - #! /foo/bar/bin/Rscript --vanilla args <- commandArgs(TRUE) dfFn <- args[1] pdfFn <- args[2] df <- read.table(dfFn, col.names=c("x", "y", "level")) df$level <- round(df$level*100, 0) col.seq <- seq(10, 79, 1) cuts <- cut(df$level, breaks = c(0, 1, seq(10, 79, 1), 80, Inf)) colors <- colorRampPalette(c('white', 'red'))(length(col.seq)+1) levels(colors) <- c("white", cuts, "black") library(lattice) trellis.device(dev=pdf, file=pdfFn) fig <- levelplot(level~x*y, data=df, col.regions=colors ) print(fig) graphics.off(); - This makes a levelplot, but the coloring is incorrect. The cells in the figure are colored from white to red, for levels between 0 and 100, instead of between levels 10 and 79. The cells containing a level of 100 are painted red, instead of black. I also get the following warning, which comes from the levels(colors) statement: - Warning message: In `levels<-`(`*tmp*`, value = c("white", "63", "24", "9", "15", : duplicated levels will not be allowed in factors anymore - What am I doing wrong with the cut() and color palette generation steps (and how can I fix them) in order to make the levelplot with correct cell coloring? Thanks for any constructive advice. Regards, Alex __ R-help@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.
[R] cor.test() running out of memory on 64-bit system
I am running into resource issues with calculating correlation scores with cor.test(), on R 2.13.0: R version 2.13.0 (2011-04-13) ... Platform: x86_64-unknown-linux-gnu (64-bit) In my test case, I read in a pair of ~150M vectors from text files using the pipe() and scan() functions, which pull in a specific column of numeric values from a text file. Once I have the two vectors, I run cor.test() on them. If I run this on our compute cluster (running SGE), I have the option of setting hard limits on the memory assigned to the compute slot or node that my R task is sent to (this is done to keep R from grabbing so much memory from the compute cluster that other non-R tasks stall and fail). If I set hard limits (h_data and h_vmem) under 8 GB, then the R task finishes early with the following R error: Error: cannot allocate vector of size 2.0 Gb What is confusing to me is that I have a 64-bit version of R, and so I should be able to use hard limits of 4GB (or, say, 5GB, if I make a generous assumption of 1GB of overhead) for this particular input size (2 GB x 2 vectors -- plus, say, 1GB of overhead). What seems to be the case is that the overhead is closer to 4 GB in size, itself, in addition to the 4 GB for the two input vectors, based on hard limits. If my hard limits are under 8 GB, then the job fails. Does cor.test() really require this much extra space, or have I missed some compilation or other magic setting that addresses this aspect of running cor.test()? Thanks for your advice. Regards, Alex __ R-help@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.
Re: [R] How do I order xyplot line points?
Perfect, thanks! On Nov 7, 2010, at 4:59 AM, baptiste auguie wrote: > Hi, > > try this, > > xyplot(Time~Chromosome|factor(Elements), > data = mtx[order(mtx$Chromosome), ], ... [snipped]) > > > HTH, > > baptiste > > > > > > On 7 November 2010 13:17, Alex Reynolds wrote: >> I have the following xyplot figure: >> >> http://img577.imageshack.us/img577/686/filesizeresults1200.png >> >> The data are organized in a matrix file as follows: >> >> Type ElementsChromosome Time >> bedGz 1200chr114.240 >> bedGz 1200chr27.949 >> bedGz 1200chr35.103 >> bedGz 1200chr45.290 >> bedGz 1200chr55.161 >> ... >> >> The x-axis labels in the Chromosome column are ordered lexicographically in >> my figure ( chr1 > chr10 > chr11 > ... ) — this is correct. >> >> However, the code I use to draw lines between points in the xyplot connects >> points in numerical order ( chr1 > chr2 > ... ) — this is incorrect. >> >> The problem this causes is most evident in the line that is drawn for the >> blue "bedGz" category. >> >> What I would like is that categorical points are joined by lines in >> lexicographic order, to match ordering of labels on the x-axis. >> >> How do I modify the xyplot command so that the lines are joined in correct >> order? >> >> Here is the code I am using to draw my xyplot: >> >> mtx <- read.table(mtxf.in, as.is=F, sep="\t", quote='', header=T, >> stringsAsFactors=T) >> attach(mtx) >> postscript(mtxf.ps, >> width = 12, >> height = 6, >> paper = 'special', >> horizontal = F) >> par(mar=c(0.0, 0.0, 0.0, 0.0)) >> mtx.p <- xyplot(Time~Chromosome|factor(Elements), >>mtx, >>type="o", >>groups=Type, >>col = c( >> 'red', >> 'green', >> 'red', >> 'green', >> 'blue'), >>auto.key=list( >> lines=TRUE, >> space="right"), >>ylab="CPU Time (sec)", >>xlab="Type", >>main="Extraction time for archive types") >> print(mtx.p) >> dev.off() >> >> Sorry if this is a dumb question. Thanks for your advice. >> >> Regards, >> Alex >> __ >> R-help@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. >> __ R-help@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.
[R] How do I order xyplot line points?
I have the following xyplot figure: http://img577.imageshack.us/img577/686/filesizeresults1200.png The data are organized in a matrix file as follows: Type ElementsChromosome Time bedGz 1200chr114.240 bedGz 1200chr27.949 bedGz 1200chr35.103 bedGz 1200chr45.290 bedGz 1200chr55.161 ... The x-axis labels in the Chromosome column are ordered lexicographically in my figure ( chr1 > chr10 > chr11 > ... ) — this is correct. However, the code I use to draw lines between points in the xyplot connects points in numerical order ( chr1 > chr2 > ... ) — this is incorrect. The problem this causes is most evident in the line that is drawn for the blue "bedGz" category. What I would like is that categorical points are joined by lines in lexicographic order, to match ordering of labels on the x-axis. How do I modify the xyplot command so that the lines are joined in correct order? Here is the code I am using to draw my xyplot: mtx <- read.table(mtxf.in, as.is=F, sep="\t", quote='', header=T, stringsAsFactors=T) attach(mtx) postscript(mtxf.ps, width = 12, height = 6, paper = 'special', horizontal = F) par(mar=c(0.0, 0.0, 0.0, 0.0)) mtx.p <- xyplot(Time~Chromosome|factor(Elements), mtx, type="o", groups=Type, col = c( 'red', 'green', 'red', 'green',
Re: [R] lattice levelplot axis + custom annotations
On May 2, 2009, at 5:08 PM, David Winsemius wrote: Not sure since you have not provided a reproducible example and not really defined what "annotations" means. By annotations, I mean that I want to draw an object (set of poiygon() elements that make up a genomic sequence logo), anchored at points along the y-axis of the levelplot, on the left side of the levelplot. I can't provide a "reproducible" example without adding a large set of files to this email, which will not get through the list. The graph itself is mostly fine; the code I provided in the previous email renders like so: http://www.flickr.com/photos/alexreynolds/3496072932/sizes/o/ On that graph, I would like to draw polygon() elements at various points along the left edge of the levelplot. Does this make more sense? Unfortunately, it's not clear from the example or help description how I would go about that. -Alex __ R-help@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.
[R] lattice levelplot axis + custom annotations
How would I set the "scales" property of a lattice levelplot, so that I can add specific annotations at specific positions? For example, I have a 200 x 1000 element levelplot. Along the y-axis (along the 1000-element axis) I would like to add annotations on the left side of the levelplot at elements 120, 300, 500, and 805, which represent clusters of interest. Currently I have no annotations in my "scales" property: colorFun <- colorRampPalette(c("white","black")) myLevelplot <- levelplot( t(scale(set.allElements))[,myLevelplot.dendrogram.order], scales=list(y=list(draw=F),x=list(draw=F)), colorkey=F, col.regions=colorFun, aspect="iso", xlab="", ylab="", main="test title", legend=(list(right= list(fun=dendrogramGrob, args=list(x=myLevelplot.dendrogram, ord= myLevelplot.dendrogram.order, side="right", size=15, size.add=0.0, add=list(rect=list(col="transparent", fill=NA)) ) Is there a straightforward way to add them? Thanks, Alex __ R-help@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.
[R] dendrogram rect.hclust() not working?
I have tried to use rect.hclust() to draw a rectangle around a set of leaves, but am running into trouble. The rect.hclust() is drawing two rects instead of one, and of the wrong size: scoreClusterObj <- hclust(scoreDistanceObj, method=clustMethod) order <- scoreClusterObj$order orderedLabels <- rep(0, length(order)) for (orderIndex in 1:length(order)) { # this puts a "name" to the permutation of leaves, done by hclust() orderedLabels[orderIndex] <- classes[order[orderIndex]] } scoreDendrogramObj <- as.dendrogram(scoreClusterObj) coloredLeafScoreDendrogramObj <- dendrapply(scoreDendrogramObj, markColoredLeaves) scoreDendrogramPlot <- plot(coloredLeafScoreDendrogramObj, horiz=FALSE, axes=FALSE) significantClustersInScoreDendrogramObj <- dendrapply(coloredLeafScoreDendrogramObj, markSignificantClusters) I have the local functions markColoredLeaves() -- which changes the colors of certain leaves, and it works fine -- and another function called markSignificantClusters(), in which I try to draw a rect.hclust() if a condition is met (i.e. a cluster is statistically significant): markSignificantClusters <<- function (n) { if (!is.leaf(n)) { a <- attributes(n) leafList <- unlist(dendrapply(n, listLabels)) if (nodesContainCertainLeaves) { ma <- match(leafList, orderedLabels) print (paste ("min-ma", min(ma), "max-ma", max(ma), sep=" ")) r <- rect.hclust(scoreClusterObj, h = a$height, which = c(min(ma), max(ma)), border = 2) print (r) quit() } } } For testing, I have a call to quit() the script after the first qualifying node has a rect drawn around it. So I run this script, and when I look at the runtime log output (from the print() statements), it finds the correct, qualifying node containing the following two items: [1] "clusters" [1] "+v_stat3_01" "+v_stat1_01" These two leaves are located at positions 5 and 6 of the tree. This is correct output from the statistical test. So I should only get one rect drawn, of width 2, containing leaves 5 and 6. Also, the "ma" variable is returning the correct leaf range (between 5 and 6, inclusively), so I know I'm passing the correct leaf range to the rect.hclust() function. But in my graphical output, I get two rects at positions 6 and 7: http://www.flickr.com/photos/alexreynolds/3409263765/sizes/o/ This doesn't seem to be an offset issue, for two reasons: 1. I am getting two rects, not one. Looking at the output from the print(r) statement, I see why two rects are drawn: [[1]] +v_stat1_01 273 [[2]] +v_e2f1_q6_01 326 2. When I re-run the script, I can occasionally get different cluster results. In one case, where I should get one rect of size 3 (containing 3 leaves), instead I get two rects containing 2 and 4 leaves, resp. separated by several other clusters. Worse, if I plot the dendrogram horizontally, the rects are drawn of completely wrong dimensions: scoreDendrogramPlot <- plot(coloredLeafScoreDendrogramObj, horiz=TRUE, axes=FALSE) yields: http://www.flickr.com/photos/alexreynolds/3410126060/sizes/o/ Is there a way to use rect.hclust() that works reliably (in both orientations, or even in one orientation)? Alternatively, is there a way to modify the thickness and color of the edges that draw down from a "significant" node? I tried adding this to my markSignificantClusters() function, within the "if (nodesContainCertainLeaves)" block, to modify the edgePar settings of a qualifying node, to no effect: n <- dendrapply(n, function(e) { attr(e, "edgePar") <- list(lty=3, col="red"); e }) If you got this far through this message, thanks. :) I would be grateful for any advice. Thanks, Alex __ R-help@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.
[R] stretching text vertically
I'd like to stretch a plotted character vertically, to create a "sequence logo". Is there a parameter to allow stretching text() output vertically or squeeze horizontally? I know about Oliver Bembom's seqLogo library, but this generates a sequence logo plot using a separate bitmap device. I want to recreate the sequence logo *inside* an existing plot. Alternatively, is there a way to embed one plot inside another? I could use imagemagick outside R to 'montage' separate bitmaps, but then the sequence logo is going to be very difficult to align (base for base) with the plot I'm trying to join it to. Thanks for any tips, Alex __ R-help@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.
[R] Dendrogram label size
Is it possible to resize the labels in a dendrogram without applying circles and triangles to edges? I tried cex.labels: plot(scoreDendogramObj, horiz=TRUE, axes=FALSE, cex.labels=0.8) but that didn't have any effect. Thanks, Alex __ R-help@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.
Re: [R] Choice of notch size in R
Many thanks to you and Peter Dalgaard for your advice. Instead of notches on a classic box plot, I have elected to draw a more "minimalized" box plot along the lines suggested by Tufte, and overlap a custom significance region on this. As a statistical question, if I log-transform my data, can I no longer rely on this significance region estimation? Kind regards, Alex [EMAIL PROTECTED] wrote: >> Is there a way to modify the choice of notch size [1] in R's boxplot >> routine from outlining a 5% significance region, to say 1% or lower? > > Yes, but it's not as simple as specifying the significance level. You'll > have to update the function boxplot.stats, specifically the line > conf <- if (do.conf) stats[3] + c(-1.58, 1.58) * iqr/sqrt(n) __ R-help@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.
[R] Choice of notch size in R
Is there a way to modify the choice of notch size [1] in R's boxplot routine from outlining a 5% significance region, to say 1% or lower? Thanks, Alex [1] McGill, Tukey, and Larsen. "Variations of Box Plots", The American Statistician, Vol. 32, No. 1, 12-16. __ R-help@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.
[R] Fitting long names in boxplot
I have the following code: subsetTimeDataPlot <- boxplot(subsetTimeData$time ~ subsetTimeData$build, horizontal=True, col="lightblue", ...) The 'names' component consists of strings that can be up to 20-30 characters long. How would I go about drawing the names vertically (not the boxplot) or shrinking the names text (I tried cex.names=0.7 but this didn't help). Thanks for any advice, I apologize if these are stupid questions, -Alex -- Alex Reynolds University of Washington Medical Genetics 2211 Elliot Seattle, WA 98121 [EMAIL PROTECTED] __ R-help@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.