search for: mypalett

Displaying 6 results from an estimated 6 matches for "mypalett".

Did you mean: mypalette
2009 Dec 03
0
Problem with predict() and factors
...recast) library("geneplotter") library(forecast) library(fUtilities) library(TSA) require(gplots) library(robfilter) SOURCEDATA <- paste("Q:/TEST/RSTATS/EPOC ",HOUR," Metrics.xls",sep="") REGRESSORS <- "Q:/TEST/RSTATS/eventswithholidays.xls" mypalette=c() mypalette$background="#FFFFFF" mypalette$chart="#FFFFFF" mypalette$forecastRegion="#66CCFF" mypalette$confidence="#FF9966" mypalette$limits="#FF0000" mypalette$major="#000000" mypalette$minor="#cccccc" mypalette$actual=&quot...
2008 Sep 03
0
Graphics: Improving a Lattice plot - can it be done ?
...c(0.5-ci/2, 0.5+ci/2) # Calculate points to plot central <- apply(x, 2, mean) areas <- apply(x, 2, quantile, q) time <- 1:dim(x)[2] # Set up plot if(missing(ylim)) ylim = range(pretty(range(areas))) plot(time, central, ylim=ylim, type="n", ...) # Draw areas mypalette <- c(rev(brewer.pal(9, "Blues")), "White") #9 is max no of colours mypalette <- colorRampPalette(mypalette, space="Lab", bias=0.25) mypalette <- mypalette(bands) for(i in rev(1:length(ci))){ x <- c(time, rev(time)) y <- c(areas[i, ], rev(a...
2008 Nov 20
1
Repost:lattice graphics -- legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles. Adding a col argument into auto.key uses the new palette with the legend text, but not in the rectangle fill. What am I missing? TIA Joachim ------...
2008 Nov 18
1
legend color problems
...d rectangles the standard palette is used. Adding a col argument into auto.key uses the new palette with the legend text, but not in the rectangle fill. What am I missing? TIA Joachim ---------code --------- library("lattice") library("RColorBrewer") # palette auswählen mypalette <- brewer.pal(7,"Accent") pathBarchartFGE <- function(selector,data,dimension = 2,title = NULL,p = mypalette) { # umwandeln für lattice Grafiken dfvar <- as.data.frame.table(data) names(dfvar) <- c("Zeitraum","FGG","Pfad","Fracht")...
2013 Jun 06
1
Error invalid graphics state using text()
...012[order(mergeshareub2012$ID),] col_no <- as.factor(as.numeric(cut(sortmergeshare2012$x, c(0, .075, .125, .25, .50)))) levels(col_no) <- c("< 7,5%", "7,5-12,5%", "12,5-25%","> 25%") sortmergeshare2012$col_no <- col_no NUTS2$col_no <- col_no myPalette<-brewer.pal(4,"Blues") shareplot2012 <- spplot(NUTS2, "col_no", col="black", col.regions=myPalette, par.settings=list(axis.line=list(col="transparent"))) shareplot2012 plot.new() locator() text(0.82421448,0.3897917,"12,41"...
2010 Jan 26
0
create custom function to annotate a levelplot
...s (z), approach used (name), species name (spname) var ---- a numeric vector with the validation value of each model This is my initial code: # ---------------------------------------------------- library(lattice);library(RColorBrewer) load("levelplot.RData") # gray colors for display mypalette = brewer.pal(9, "Greys") # plot levelplot(z ~ s1 + s2 | name * spname, data=df, col.regions=mypalette, at=c(0,.1,.2,.3,.4,.5,.6,.7,.8,1), layout=c(3,1), xlab=NULL, ylab=NULL, scales=list(draw=FALSE)) # ----------------------------------------------------- But now I would like to do som...