similar to: Legend in image.plot( )

Displaying 20 results from an estimated 40000 matches similar to: "Legend in image.plot( )"

2011 Jul 29
2
problems with image.plot()
Hi all, I used image.plot() to create a heat map of a matrix: as.matrix(read.table("Matrix.txt", sep="\t"))->x HeatBrk<-seq(5,25,2.5) MyCol= gray((7:0)/7) library(fields) image.plot(x, col=MyCol, breaks=HeatBrk, legend.shrink=0.3) dev.copy(device=pdf, file="HEAT4!.pdf", height=8, width=8) dev.off() There are a few things that I would like to do that I
2004 Dec 04
1
Wishlist: heatmap/image legend (PR#7402)
Full_Name: Elizabeth Purdom Version: 1.9.1 OS: Windows XP Submission from: (NULL) (171.64.102.199) It would be great if heatmap and/or image had the option of printing a legend bar on it somewhere that would indicate the ranges given by the colors in the heatmap (i.e. a very small image rectangle with the same colors as in the heatmap). Because heatmap is using layout, it seems pretty
2011 Jul 19
1
Assigning colors to cells
Hi everyone, I was wondering if there was a simple way to assign a color to a cell based on value in a data frame and return the cell as an image? For example, if the value is >1, then blue, if between 1 and 2, green, if between 2 and 3, yellow, etc. I tried using a heatmap function but I was hoping there was an easier way to do this. Thanks, Sumukh
2011 Aug 25
2
axes start at end of plot
Hello all, I used the following script to generate a plot, but when I try to place axes, the axes start at the end of my plot and continue off the plot; the attached image shows what happens when I try to generate axes. library(fields) as.matrix(read.table("Matrix.txt", sep="\t"))->x #the matrix is a square matrix measuring 104x104; it was too large to attach #on left:
2011 Aug 20
0
axis does not show up
Hello everyone, Using the following script I generated a heatmap for my matrix with image.plot from the fields package: library(fields) as.matrix(read.table("Matrix.txt", sep="\t"))->x #on left: labels are: Side<-as.character(x[1,2:ncol(x)]) length(Side)->nS #on bottom, labels are: Bot<-as.character(x[2:nrow(x),1]) #remove first row and column
2006 Feb 14
0
Legend in a HeatMap
List, Is it possible to add a color legend to a heatmap , similar to the one in levelplot and filled.contour plot. The legend will represent the colors used in the heatmap along with values for each color range. Can this be done? Please help. Thanks, Svakki.
2012 Feb 10
5
how to plot a nice legend?
i'd like to plot a legend in my diagram. The diagram will be included in a TikZ LaTeX document later. I tried the legend() function, but - it can not find a good place it self where the legend fits and playing around with coordinates and scaling consumes a lot time - standard settings for the text need adjustment (linespacing is quite large and so on) Is there an alternative to
2011 Jun 18
0
help with quantification of high density region
Hello, I am entirely new to this list, and not very experienced with R yet (but very excited about it!!). I am struggling with a dataset of x and y coordinate points I am plotting as a density map as follows: trial <- read.csv(file="F12.csv", sep=",", skip=32, head=TRUE) trial.sub <- subset(trial, Seconds>=30) trial.sub <- subset(trial.sub, Seconds<=1830) d
2010 Feb 07
3
specifying colors in a heatmap/image -like plot
Hi, I have searched for a solution but I failed to find an answer. I am hoping you may be able to help me. I have a data set where I have observations for a number of units (n =~40) over a period of time (t =~100) and I have a variable (Z) that codes a categorical variable for each observation. I want to produce a 2D plot where time is on the x-axis and units are on the y-axis. Then each block
2007 Oct 02
2
How to add legend for image()?
Dear friends, The following is an example to explain my question. I want to get a legend which will show the z-values according to different colors in image() function. x<-sort(runif(10)) #x-coordinates y<-sort(runif(10)) #y-coordinates z<-matrix(runif(100),nrow=10) #attributes values image(x,y,z,col=gray((6:3)/6)) # legend(x,y,legend=z,col=gray((6:3)/6)) #error. the colors should
2010 Nov 17
0
Label positions for the legend when using smallplot within image.plot
Hi all, after having many images plots on my window, I want to have one single legend plot. For that I use image.plot where the position is defined within smallplot: image.plot(legend.only=T,zlim=c(0,400), col=rainbow(50),horizontal=T,smallplot=c(.05,.45, .03,.06)) This works fine, but I found that the labels of the x axis are too much far away from the axis. Therefore I wanted to use
2005 Aug 22
0
How to add legend of plot.Design function ( method=image)?
Dear Rlist, How can the Legend of the plot.Design() function can be visualized? Following the documentation in R, I did the following (see below), only the 'Legend' function doesn't visualize the legend of the plot (method='image') of the lrmfit. I tried to change par( margin setting) but this didn’t solve it. How can this be solved? Thanks a lot, Jan
2017 Jul 13
0
about plotting a special case
If you want colors mapped to the _values_ in DF1$C, there are a number of ways to do it: Color_unq<-color.scale(DF1$C,c(1,0),c(0,0,c(0,1)) This will produce colors from the lowest values (red) through the highest (blue). See the help page for color.scale to get different colors. With this you can use color.legend to add a mapping of the values and colors. If you just want different colors,
2011 May 11
1
Adding legend to heatmap
Hello, Myself Rugma Gopakumar.I would like to know how to add a legend to a heatmap.. Regards, Rugma Gopakumar. [[alternative HTML version deleted]]
2011 Feb 22
1
image.plot results in different colors than legends
To R community: I've been pulling my hair for the past few days over this issue now, and I may be at the point where I just can't spot my error. So I thought to reach out to the community and hope someone could kindly help me. I'm trying to create a correlation matrix and plot it. However, I'm trying to create a hybrid of correlation matrix from two different periods, say
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi, When running z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image') Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)), zlab='Probability') And after pointing the cursor to the plot() screen in R, I obtain the following message: Using function "locator(2)" to place opposite corners of image.legend Error in
2011 Jul 10
3
change legend character size in image.plot
I'm using the image.plot() function (fields package), but I want to enlarge the characters of the legend (as they are too small to be read in a combined figure), but there is no way I can find a command to do this. I can enlarge the legend bar (with legend.witdh), axis character size (cex.axis) or the total legend size (legend.shrink), but not the character size of the legend characters
2012 Feb 15
2
assign same legend colors than in the grouped data plot
Dear community, I've plotted data and coloured depending on the factor variable v3. In the legend, I'd like to assign properly the same colors than in the factor (the factor has 5 levels). I've been trying this but it doesn't work. plot(var1, var2, xlab = "var1", ylab = "var2", col =var3 , bty='L') legend(locator(1),c("level 1 var3",
2012 Feb 24
1
Telling plot() the max y value to expect when plotting one distribution and then using lines() to add more distributions
I am plotting three Pearson Type IV distributions. It looks like I have to plot the distribution with the highest value of y and then use lines() to add the two distributions that are shorter / have lower max values of y. The following code figures out which distribution has the max y value, plots it first and then uses lines for the other two distributions with a series of three if statements.
2002 Sep 10
4
legend outside axes of image or other plot
I have tried and tried unsuccessfully to place a legend outside the plot frame of a graph. This would allow me to draw a legend for an image() plot. But any legend I add is cut off outside the axes. Is there a way of doing this? Thanks for any advice on how to make this work (I'm using R1.5.1 with Windows 2000). Richard Condit Smithsonian Tropical Research Institute Unit 0948 APO AA