similar to: Problem with levelplot() in a loop

Displaying 20 results from an estimated 3000 matches similar to: "Problem with levelplot() in a loop"

2006 Dec 22
1
heatmap with levelplot?
Hi, How do I anchor z=0 to the white color in a levelplot so that the color changes from cyan to magenta precisely as z changes from negative to positive? Also is it easy to change color scheme, say to blue/red as it's more dramatic? Is there a better function for showing heatmap with a color bar? Thanks in advance for any help, I've played with image, heatmap and levelplot a little and
2009 May 05
3
Heatmap without levelplot
Hi there, as I'm not sure to understand the coloring levelplot uses, I'm looking for another easy way to create a heatmap like this: library(lattice) mat <- matrix(seq(1,5, length.out = 12), nrow = 3) mat[1,2] <- 3.5 my.at <- seq(0.5,5.5, length.out = 6) my.col.regions <- rainbow(5) graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions = my.col.regions)
2008 Sep 25
2
levelplot/heatmap question
Hello! I have data containing a large number of probabilities (about 60) of nonzero coefficients to predict 10 different independent variables (in 10 different BMA models). i've arranged these probabilities in a matrix like so: (IV1) (IV2) (IV3) ... p(b0) p(b0) p(b0) p(b1) p(b1) p(b1) p(b2) p(b2) p(b2) ... where p(b1) for independent variable 1 is p(b1 !=
2011 Nov 07
2
adjusting levelplot color scale to data
Hi guys, I have a matrix with values varying from approximately -0.7 to 0.33 that I want to create a heatmap/levelplot with. When I execute the levelplot function for my matrix, I end up getting colors that are adjusted to the max and min rather than around 0. In other words, ideally I would like to have a color ramp that goes from red (negative number), to white (0), to blue (positive);
2008 Oct 17
1
padding "bug" in lattice/levelplot
Hello, I have encountered some unexpected behaviour with levelplot that may simply be a misunderstanding on my part. If I create a levelplot from a matrix with named columns, some "padding" space appears at the top and bottom of the heatmap. Here is an example, and I've used panel.fill to make the space I'm speaking of evident (in green).
2009 Jan 26
2
heatmap with levelplot
Hi there, I'd like to create a heatmap from my matrix with a) a defined color range (lets say from yellow to red) b) using striking colors above and below a certain threshold (above = "green", below = "blue") Example matrix (there should be a few outliers generated...) + simple levelplot without outliers marked: library(lattice) my.mat <- matrix(rnorm(800), nrow =
2009 Sep 28
2
Levelplot without margins
Hello, I'm not very experienced with lattice and I was wondering whether I get get some hints from you how to create a pure heatmap (using levelplot), without any axis, title, legend, margin at all... I just want to see the coloured squares, nothing else. Any suggestions? Antje
2010 Jan 26
2
heatmap.2 color range
Hi, I'm trying to create a heatmap with color ranges for different values in my matrix. For example: If x > 5 , use orange gradient if x < 1.5, use red gradient ..... Right now I have the following: orgPal<-brewer.pal(3,"Oranges") bluPal<-brewer.pal(3,"Blues") redPal<-brewer.pal(3,"Reds") grad <- ifelse(randMat >
2012 Jul 11
1
Using data stored in a file for a heatmap
Hi all, I just try to get familiar with levelplot() for generating heatmaps. I have x, y, z-data stored in a file: e.g.: "file.csv": 0 0 0.1 0 1 0.5 0 2 0.4 1 0 0.3 1 1 0.4 1 2 0.6 ... I can use scan() for generating the matrix for R: inp <- scan("file.csv", list(0, 0, 0)) How can I feed inp into levelplot()? Thanks a lot for your help Richard -- Richard M?ller . Am
2009 May 04
4
levelplot question
Hi there, I have a question concerning the behaviour of the colouring with levelplot. (I hope, I manage to explain) If I give the parameters "at" and "col.regions" like this: at <- c(1,2,3,4,5,6) col.regions <- c("blue","blue","blue","yellow","yellow","yellow") Which color would have the value 3.5? I would
2011 Sep 23
2
image function help required
Hi, I have a question concerning the image function and how to generate custom axis labels: dat<-sample(0:1,1000,replace=T) matrix(dat,ncol=5,nrow=200)->x x[order(x[,1],x[,2],x[,3],x[,4],x[,5]),]->x I would like to have a heatmap kind of thing like this: image(t(x),col=c(0,1),axes=F) axis(1, 1:5, c(colnames(x))) I only do see parts of the axis (only an "A" is
2008 Nov 25
1
row labels in heatmap.2(package gplots)
Dear R users, I have a question regarding how to make row labels readable in a heat map. I have successfully made a heat map using function "heatmap.2" in the package "gplots". However, as there are many rows in the heat map, I have difficulties labeling them (heatmap.2 provides a parameter "labRow" to label the row names, but as I have too many rows, I can not make
2007 Dec 16
0
levelplot border and dendrogram width
Hello, I'm trying to learn how to use lattice and levelplot in particular. There are three elements of customizing the plots I'm stuck with: a) Is there a way to put borders around each "cell" within a level-plot. I'm trying to do something like the colsep/rowsep/sepcolor/sepwidth parameters of heatmap.2 in gplots b) Can I alter the line-width of dendrogram added
2006 Jun 13
2
levelplot and source() problems
I have been using levelplot but have had trouble calling it inside functions - something seems to go wrong when it's not called directly from the R command prompt. Simplest reproducible example: $ R --vanilla > library(lattice) > levelplot(matrix(1:4,2,2)) - This gives a nice plot in soothing pastel colors. Now, with a file lptest.r containing 2 lines: library(lattice)
2011 May 06
1
How to alter circle size
Hello all, I'm trying to create a heatmap using 2 matrices I have: z and v. Both matrices represent different correlations for the same independent variables. The problem I have is that I wish to have the values from matrix z to be represented by color intensity while having the values from matrix v to be represented by circle size. I currently have the following in front of me and an unsure
2006 Sep 13
1
forcing levelplot to use relative cuts (ie cuts for each panel)
Dear guRus, I'm having trouble producing a levelplot with relative cuts for each panel (my data has large differences in scales, so I want to use quantiles for each panel). My attempts to change the 'at' argument in panel.levelplot function have not met with success. Below is a toy example. xy <- expand.grid(x = 1:3, y = 1:3) aaa <- rbind(cbind(xy, z = 1:9, site =
2005 Mar 30
1
help with plotting a grid on levelplot
I'm trying to plot a grid over a levelplot print( levelplot( var1.pred~x+y, data=saw.pred, aspect=mapasp(saw.pred), col.regions=terrain.colors(80), main=main) ) using the data... > saw.pred x y var1.pred var1.var sort 1 5 5 3.3761200 256.3363 saw 2 15 5 3.3884142 499.5695 saw 3 25 5 3.5394769
2005 Apr 20
1
overlaying a contour line in a levelplot
Hello there, I am creating a series of images using levelplot but I also want to overlay a contour for a particular value as reference. Here is the levelplot command for the image: print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab= NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T) and then to add the contour plot (I only want a contour at level 5):
2006 Feb 12
1
contour lines for levelplot
Hi, I would like to add contour lines to a (trellis/lattice-) levelplot. Sure, there is the "contour=TRUE" argument, but this uses "cuts=..." (which is usually chosen very high for my plots. I guess cuts=99 is the best you can do (?)) for plotting the contour lines. Furthermore, I do not like the numbering of the contour lines this way. Therefore, I tried to add a
2009 Nov 09
1
How to change color the default in levelplot() ?
Dear R communities May I seek your advices on how to change color the default in levelplot(), e.g. from the default of pink and light blue, to e.g. red and green ? The levelplot function has 1 of the arguments being panel (which is actually panel.levelplot), but I am not sure where the commands to alter the color. For example, I type: p1<-levelplot(my.mat,colorkey=FALSE), how could I