search for: grey90

Displaying 20 results from an estimated 35 matches for "grey90".

Did you mean: grey50
2008 Mar 23
2
ggplot2 - legend for fill coulours
...in that the order of the colours does not match the labels. My code is below. Can anyone tell me how to get around this? (R 2.2.6 for Windows, ggplot2 version 2_0.5.7) Thanks, Pedro library(ggplot2) Data: > plotdata2 x y group 1 1 0.1 grey30 2 2 0.2 grey30 3 3 0.3 grey10 4 4 0.4 grey90 5 1 0.1 grey30 6 2 0.2 grey60 7 3 0.3 grey60 8 4 0.4 grey90 9 1 0.1 grey60 10 2 0.2 grey10 11 3 0.3 grey90 12 4 0.4 grey30 13 1 0.1 grey90 14 2 0.2 grey60 15 3 0.3 grey10 16 4 0.4 grey10 > levels(plotdata2$group) [1] "grey10" "grey30" "grey60" "grey90&quo...
2012 Jan 10
2
stacked barplot colour coding
...ple data that looks like this: bg ag 0.41 2.81 0.37 2.91 0.31 2.06 0.32 2.39 every row indicates a factor (1,2,3,4, see below in names.arg). Now when i plot this using following function for stacked barplots: plot<-barplot(t(data), main=txt, ylim=c(0,10), col=c("white", "grey90"), ylab="Total biomass (g)", space=0.1, names.arg=c("1", "2", "3", "4")) i get a lovely stacked graph and it color-codes with white (bg) and grey90 (ag) in each individual stacked bar. I have a total of 4 stacked bars as i have 4 factors. N...
2009 Mar 23
1
changing order of lattice plots
Hi, This is another question relating to my 2 factor figure. densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12), xlab="Element Length",type="percent", col="grey60", strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5))) I would like to flip the plot so those at the bottom are at the top and so on. I have tried using a `index.cond=list(60:1)' (I have 3 classes for Chromosome and 20 classes for Type) parameter - this approximates what I want while I sort out the syntax. But...
2012 Oct 03
5
error bars on line plot with error bars using ggplot
I'm new to this and struggling away with ggplot. I need to plot some line graphs for about 4 series. I have the values to plot and also the value of the standard error of the value. Is it possible to plot the standard error bars when the value are already calculated as opposed to letting R do the analysis to calculate the SE bars? Any simple example would be most appreciated. Thanks J
2012 Apr 25
1
FW: Combined grouped and stacked bargraph
...69 6 4 2 2 0 National.CS.Terrestrial 16 148 7 7 4 2 National.CS.Marine 69 6 4 2 2 0 I have tried the following code, but it does not work: barplot(cs.not.log.bp[c(1:2),], xlab = "Conservation status", ylab = "Number of species", col = c("grey90","grey80"),names = cs.names, ylim = c(0,250), space = 2) barplot(cs.not.log.bp[c(3:4),], col = c("grey60","grey30"), beside = T,add = T,names.arg = NA) legend("topright",c("IUCN Terrestrial","IUCN Marine","National CS Terrestri...
2012 Apr 24
2
Combined grouped and stacked bargraph
...69 6 4 2 2 0 National.CS.Terrestrial 16 148 7 7 4 2 National.CS.Marine 69 6 4 2 2 0 I have tried the following code, but it does not work: barplot(cs.not.log.bp[c(1:2),], xlab = "Conservation status", ylab = "Number of species", col = c("grey90","grey80"), names = cs.names, ylim = c(0,250), space = 2) barplot(cs.not.log.bp[c(3:4),], col = c("grey60","grey30"), beside = T,add = T,names.arg = NA) legend("topright",c("IUCN Terrestrial","IUCN Marine","National CS Terre...
2009 Jun 25
3
grid.polygon() + color gradient
Hi, I wonder whether there is a way to generate a polygon (a triangle in my case) with color gradient using grid.polygon() in package grid? I tried something like library(grid) grid.polygon(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(col=NA, fill=colorRampPalette(c("green", "lightgray"), space="Lab")(200))) But am only
2009 Jun 26
1
gradient fill of a grid.polygon
...ripe){ if(ii%%2)# plotting only every other slice grid.draw(editGrob(g, gp=gpar(fill=cols[ii], col=cols[ii], alpha=alpha))) }else{ grid.draw(editGrob(g, gp=gpar(fill=cols[ii], col=cols[ii], alpha=alpha))) } } } g <- polygonGrob(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(fill=NA, col="grey90")) g2 <- polygonGrob(x=c(0, 0.5, 1), y=c(0.5, 0, 0.5), gp=gpar(fill=NA, col="grey90")) grid.rect(gp=gpar(fill="black")) grid.rect(y=1, gp=gpar(fill="white")) gradient.polygon(g) gradient.polygon(g2) Now, I have a (large) number of issues here, 1) the stripe...
2011 Aug 21
1
Dot plot with two grouping variables concurrently
...ot.key<-list( corner=c(1,0), text=list(levels(Cal_dat$Commodity)), title="Ore type", points=list(pch=21,cex=1.3,fill=col.pat,col="black") ) ##set some parameters for the dotplot trellis.par.set( dot.line=list(col = "transparent"), axis.line=list(col = "grey90"), axis.text=list(col ="grey50", cex=0.8), panel.background=list(col="grey98"), par.xlab.text= list(col="grey50") ) ## Create the dot plot dotplot(reorder(Mine, Resc_Gt)~ Resc_Gt,groups=Commodity, data=Cal_dat, cex=1.2, pch=21, aspect=2.0, key=plot...
2012 Feb 07
3
Lattice - different axis length
...period, data=graph5, as.table=T, xlim=c(0,150), layout=c(3,1), par.strip.text=list(cex=1.5), scales = list(alternating = 3, cex=1.2, tick.number=5), xlab="", col=c("grey15","grey75","grey30","grey90","grey45","grey0","grey60","grey100"), #col=c(grey(100:1/100), grey(50:1/100), grey(0:1/100)), stack=T) Unfortunately, in the first two periods there are much less data, hence the bars are much shorter in those two panels and most of t...
2009 Sep 16
1
changing number of axis
...s by chromosome for a large data set (I am asking here because experimentation with options is precluded due to this - generating the figure takes about an hour): barchart(hits~bin|chromosome, data=hits, horizontal=FALSE, origin=0, lab=c(3,10), layout=c(1,5,5), strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5)), as.table=TRUE); I have about 2500 bins for the largest factor and barchart is drawing tick labels for a substantial proportion of these (how many, I can't see since due to the density of the labels). My question is how I can get a sane number of labels al...
2009 Mar 23
1
lattice multipanel strip placement - with two factors
...e to prevent plotting the actual points which detract from the figure - is there another way of doing this?): densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12), xlab="Element Length",type="percent", col="grey60", strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5))) Plotting 60 panels and associated strips on a page leaves the whole thing pretty tight and so I'd like to move the 3 class factor strips to the left margin of the whole figure. Like so (pardon the ASCII art): +-+----+----+----+----+----+ + +----+----+---...
2011 Oct 18
3
Ordering of stack in ggplot (package ggplot2)
...fill = "") b <- a + geom_bar(stat = "identity", position = "stack") b <- b + scale_fill_brewer(palette = "Set1") immigration_theme <- theme_update(axis.text.x = theme_text(angle = 90, hjust = 1), panel.grid.major = theme_line(colour = "grey90"), panel.grid.minor = theme_blank(), panel.background = theme_blank(), axis.ticks = theme_blank(), legend.position = "right") b/ Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/Ordering-of-stack-in-ggplot-package-ggplot2-tp3917159p3917159.html...
2011 Sep 10
0
Mutiple vertical reference lines with a dotplot
...;,"blue","black","yellow") # Circles squares and diamond symbols for the years sym.pat<-c(19,20,21) ##set up the plot key #---------------------------------------------------------------------------------------- # key for commodities # defaults bord.col<-"grey90" trans.fac<-0.5 sym.siz<-1.8 key1 <- draw.key(list(text=list(levels(Cal_dat$Commodity)), title="Ore type", border = bord.col, background = bord.col, alpha.background=trans.fac, just=1, points=list(pch=22...
2011 Aug 25
1
Sorting order of reorder with multiple variables
...22, 23), cex=1.3, col="black")), draw = FALSE) mkey <- mergedTrellisLegendGrob(list(fun = key2), list(fun = key1), vertical = TRUE) ) ##set some parameters for the plot trellis.par.set( dot.line=list(col = "grey90", lty="dashed"), axis.line=list(col = "grey90"), axis.text=list(col ="grey50", cex=0.8), panel.background=list(col="transparent"), par.xlab.text= list(col="grey50") ) ## Create the dot plot with(Cal_dat, dotplot(reorder(paste(Mine,Co...
2009 Nov 20
1
how to specify the order of panels with xyplot
...chondrion 16571 24 23 NC_000023.9 Homo sapiens chromosome X 154913754 25 24 NC_000024.8 Homo sapiens chromosome Y 57772954 > xyplot(hits~bin|chromosomes$name[Chromosome+1],data=hits,horizontal=FALSE,origin=0,lab=c(3,10),pch=20,cex=0.01,layout=c(1,5,5),strip=strip.custom(style=3,bg="grey90",par.strip.text=list(cex=0.5)),as.table=TRUE) I am wondering how to reorder the panels such that they are plotted in the order of chromosomes$id rather than chromosomes$name. I am sure that this has been answered in the past, but I am finding it difficult to understand (I have looked at fact...
2008 Jun 23
5
Need ideas on how to show spikes in my data and how to code it in R
Hi I have recently been analyzing birthweight data from a clinic. The data has obvious defects in that there is digit preference on certain weights making them overrepresented. This shows as spikes in the histogram on certain well rounded weights like 2, 2.5, 3, etc. I would like to show this to government officials but can't figure out how I should present the finding in an easy to
2010 Aug 09
1
creating pdf of wireframe
...duced. For example, the line width I have specified is not reproduced, and neither are the font sizes for the axis labels. I'm an R novice, so I could really use some guidance. Here is the code I am using (post1, post2, post3 are 3-dimensional matrices): newcols <- colorRampPalette(c("grey90", "grey10")) #generates palette frome light to dark grey for better visibility trellis.device(pdf,file="PostAll.pdf", width = 5, height = 5) trellis.par.set("plot.line", list(lwd=0.15)); top.left <- wireframe(post1, xlab=list("p(adj-N)", cex=.7, rot...
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
...major=theme_line(colour="darkgrey",size=0.71)) # that works fine last_plot() + opts(panel.border=theme_rect(colour="black",size=0.71)) # that only changes the bottom and right border of the panel last_plot() + opts(strip.background=theme_rect(colour="black",fill="grey90",size=0.71)) # that only changes the bottom and right border of the stripes last_plot() + opts(axis.line=theme_segment(size=0.71)) # trying to increase the line width of the left border of the panel, i.e. the y-axis, # however, that changes only the y-axis of the left column of panels, not o...
2009 Jan 19
2
plotting arrows with different colors and varying head size
...histogram arrowlen <- sqrt(u^2 + v^2) hist(arrowlen) ## recode arrow lengths (by interval) into colors ## sorry, I don't know how to do it without the car package library(car) arrowL <- recode(as.vector(arrowlen), "0='grey90'; 0:0.05='grey50'; 0.05:0.1='grey'; 0.1:0.15='cyan'; 0.15:0.2='blue'; 0.2:0.25='re...