similar to: Plotting colors on a world map

Displaying 20 results from an estimated 2000 matches similar to: "Plotting colors on a world map"

2009 Apr 30
2
gridding values in a data frame
Hi all, I have a data frame that looks like such: LATITUDE LONGITUDE TEMPERATURE TIME 36.73 -176.43 58.32 1 50.95 90.00 74.39 1 -30.42 5.45 23.26 1 15.81 -109.31 52.44 1 -80.75 -144.95 66.19 2 90.00 100.55 37.50 2
2009 May 13
4
plotting a grid with color on a map
Hi all, I have posted similar questions regarding this topic, but I just can't seem to get over the hump and find a straightforward way to do this. I have attached my file as a reference. Basically, the attached file is a 5 degree by 5 degree grid of the the world (2592 cells), most of them are NA's. I just want to be able to plot this grid over a world map and color code the cells. For
2013 Jan 16
1
setting the legend scale in contour plots
Hi, I'd like to compare SST data for year 2000 with SST for year 2001. I managed to get filled contour plots showing monthly SST for both years (12 plots for each year, 24 plots in total). In order to compare year 2000 and year 2001, however, I'd need to have the same legend scale (same color bar) in both years plots. Thus, my question is: is there a way to set the legend scale in
2010 Feb 10
2
color palette heatmap
Hi, I'm kinda new of the R world. I need to use the heatmap or heatmap.2 function to plot correlation values. 2 questions: - how can I specify a color palette? (would like to have a transition from blue(-1) to white(0) to red(1)) - how can I use heatmap.2 imposing a specific order (like hclust.order)? I mean, I don't want heatmap.2 to re-cluster/re-order my data but just to plot them
2012 Feb 16
2
Defining a viewport scale in {Grid}
Am just feeling my way into the grid library, and cannot figure out how to define the plot limits. 3/5 of the example polygons below plot in the default 0-1 range viewport. But when I try to redefine the viewport the polygons plot in the same places. I also get the same result without employing push/pop. (As you can see from the scale I'm trying to introduce, I want to plot map polygons.)
2012 Mar 16
2
plotting border over map
I am using following codes to plot map library(sp) library(rgdal) library(maps) library(gplots) library(clim.pact) library(fields) source("/R/PlotGridded2DMap.R") source("/R/image.plot.fix.R") source("/R/image.plot.plt.fix.r") seasonal_plot<-function(input,lonll=-180,latll=-90,lonres=5.,latres=3.75,write_file=TRUE,The_title=NULL){ if(is.null(The_title)){
2009 Nov 25
1
interior and exterior colors of a map
Hi useR's, I have an image plot I want to overlay a map of the United States on, via map('usa'). The image is basically a large rectangular of various colors. When I overlay the United States map, the full rectangle of the image plot is visible, but I only want to display the image WITHIN the United States boundary. Does anyone know a way to do this? Thanks in advance, dxc13 --
2007 Sep 10
5
finding the minimum positive value of some data
useRs, I am looking to find the minimum positive value of some data I have. Currently, I am able to find the minimum of data after I apply some other functions to it: > x [1] 1 0 1 2 3 3 4 5 5 5 6 7 8 8 9 9 10 10 > sort(x) [1] 0 1 1 2 3 3 4 5 5 5 6 7 8 8 9 9 10 10 > diff(sort(x)) [1] 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 > min(diff(sort(x))) [1] 0
2008 Jul 29
3
finding a faster way to do an iterative computation
useR's, I am trying trying to find out if there is a faster way to do a certain computation. I have successfully used FOR loops and the apply function to do this, but it can take some time to fully compute, but I was wondering if anyone may know of a different function or way to do this: > x [1] 1 2 3 4 5 > xk [1] 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 I want to do:
2008 Jul 24
2
simple random number generation
useR's, I want to randomly generate 500 numbers from the standard normal distribution, i.e. N(0,1), but I only want them to be generated in the range -1.5 to 1.5. Does anyone have a simple way to do this? Thanks, dxc13 -- View this message in context: http://www.nabble.com/simple-random-number-generation-tp18642611p18642611.html Sent from the R help mailing list archive at Nabble.com.
2008 Sep 16
2
question in value-based color in image()
Hello, I have a matrix A with value varying from -1 to 1. I hope to use scaled color based on its value to produce an image of this matrix. Suppose I hope to label those data in [-1,-0.5] with blue, label those [-0.5,0.8] with light blue (tone is proportional to its value, e.g. rgb(1-tone, 1-tone, 1) where tone=abs(A)/0.5), and label those [0.8,1] with white. How can I use image() and rgb() to
2008 Jan 16
3
color ranges on a 2D plot
useR's I am trying to color the points on a scatter plot (code below) with two colors. Red for values 0.5 -1.0 and blue for 0.0 - .49. Does anyone know a easy way to do this? x <- runif(100, 0, 1) y <- runif(100, 0, 1) plot(y ~ x, pch=16) Thanks, dxc13 -- View this message in context: http://www.nabble.com/color-ranges-on-a-2D-plot-tp14893457p14893457.html Sent from the R help
2009 May 24
2
Deleting columns from a matrix
useR's, I have a matrix given by the code: mat <- matrix(c(rep(NA,10),1,2,3,4,5,6,7,8,9,10,10,9,8,NA,6,5,4,NA,2,1,rep(NA,10),1,2,3,4,NA,6,7,8,9,10),10,5) This is a 10x5 matrix containing missing values. All columns except the second contain missing values. I want to delete all columns that contain ALL missing values, and in this case, it would be the first and fourth columns. Any column
2009 May 04
2
A variation on the bar plot
Hi all, I cannot think of the technical name of this plot, but I want to create a plot with the data below that looks like two back-to-back horizontal bar plots. Ideally, there would be a vertical line in the center of the plot at zero, and on the right hand side would be 4 bars representing the values for 2007, and on the left side of the vertical line would be the corresponding values for 2005.
2009 May 19
3
how to calculate means of matrix elements
useR's, I have several matrices of size 4x4 that I want to calculate means of their respective positions with. For example, consider I have 3 matrices given by the code: mat1 <- matrix(sample(1:20,16,replace=T),4,4) mat2 <- matrix(sample(-5:15,16,replace=T),4,4) mat3 <- matrix(sample(5:25,16,replace=T),4,4) The result I want is one matrix of size 4x4 in which position [1,1] is the
2007 Sep 17
2
how to compare 2 numeric vectors
useR's I am trying to compare two vectors that have the same length. More specifically, I am interested in comparing the corresponding positions of each element in the vector. Consider these two vectors of length 20: v1 <- 2 2 4 NA NA NA 10 NA NA NA NA NA NA NA NA NA NA NA NA NA v2 <- NA 4 NA NA NA NA 10 NA NA NA NA NA NA NA NA NA NA NA
2008 Feb 21
3
applying a function to data frame columns
useR's, I want to apply this function to the columns of a data frame: u[u >= range(v)[1] & u <= range(v)[2]] where u is the n column data frame under consideration and v is a data frame of values with the same number of columns as u. For example, v1 <- c(1,2,3) v2 <- c(3,4,5) v3 <- c(2,3,4) v <- as.data.frame(cbind(v1,v2,v3)) uk1 <- seq(min(v1) - .5, max(v1) + .5,
2008 Aug 30
1
help with "persp" function
Dear List, I am trying to draw a rectangular plane using the persp function, however I can't seem to get it to work. I want the length along x1 axis to be between 1 and 3 and the length along the x2 axis to be between 1 and 4. All z values for x1 should be equal (say, z=1) because this is a plane, not a cube. Below is my current code. Any help is appreciated Thanks in advance dxc13 x
2008 Feb 20
2
intersecting rows of a matrix
useR's, First, I would like to say thanks to John Fox for providing this segment of code to perform intersection for multiple sets: intersection <- function(x, y, ...){ if (missing(...)) intersect(x, y) else intersect(x, intersection(y, ...)) } I want to execute this function on the rows of a matrix I have: Ik.mat.test <- matrix(c(2,3,6,1,2,6,6,1,2),byrow=T,nrow=3) > Ik.mat.test
2007 Dec 18
3
creating a database
useR's, I am writing a program in which the input can be multidimensional. As of now, to hold the input, I have created an n by m matrix where n is the number of observations and m is the number of variables. The data that I could potentially use can contain well over 20,000 observations. Can a simple matrix be used for this or would it be better and more efficient to create an external