search for: spplot

Displaying 20 results from an estimated 76 matches for "spplot".

2014 May 05
3
Mapa de quantiles con spplot
...dd=T) legend(3777189,2249615, legend=names(attar(colcode, ?table?)), fill=attr(colcode, ?palette?), cex=0.6, bty=?n?) Entonces obtengo el mapa como lo quiero (Me falta la división política, pero para este ejemplo la omití): https://www.dropbox.com/s/w3ps61o4jr1ciy5/part88.tiff Cuando lo hago con spplot: spplot(zm, "part88", col.regions=plotclr, cuts=nclr, key.space="bottom?) Me regresa lo siguiente: https://www.dropbox.com/s/2cgiua5ra2tx4a0/part88_spplot.tiff Entonces lo que quiero es usar el spplot para pintar dos variables c(?part88?, ?part93?), que el mismo ?legend? aplique...
2014 May 03
2
Mapa de quantiles con spplot
Hola, Intento representar en un mapa participaciones porcentuales de los sectores económicos y no logro hacerlo con spplot. He intentado con spplot(zm, c(?part88?, ?part93?), cuts=4, col.regions=brewer.pal(4, ?Set3?)) Lo pude hacer utilizando el base graphics de R, definiendo: > plotvar88 <- zm$part88 > nclr <- 8 > plotclr <- brewer.pal(nclr, "PuOr") > plotclr <- plotclr[nclr:1] &gt...
2011 Dec 03
1
side-by-side map with different geographies using spplot
...inneapolis/Census/2010/Census_BlockGroup_GEO/","tl_2010_27053_bg10") Cleveland=readOGR("../Cleveland/Census/2010/Census_BlockGroup_GEO/","tl_2010_39035_bg10") par(mfrow=c(1,2)) plot(Minneapolis) plot(Cleveland) I can display a single thematic map for a city using spplot as follows: spplot(Minneapolis,"Thematic_Data_Column") But, calling the function again for Cleveland just overwrites the window. I am unsure how to use spplot's layout tools with two different geographies. Most examples use a single geography and multiple attribute columns. Alter...
2014 May 07
2
Mapa de quantiles con spplot
...ola, Lo hice de la forma en que propones y no me sale, no sé si algo esté mal con R, porque no me respeta ni el ?key.space?, me lo sigue poniendo en la parte izquierda del gráfico Saludos El 06/05/2014, a las 02:21, Olivier Nuñez <onunez en unex.es> escribió: > El segundo argumento en spplot ha de definir el número/nombre del intervalo al que > pertenece el area a pintar. > Este código debería funcionar: > > zm$class88=findCols(classIntervals(zm$part88, nclr, style="quantile")) > zm$class93=findCols(classIntervals(zm$part93, nclr, style="quantile"))...
2010 Dec 14
1
lattice fun: multiple themes in panels with spplot()
...), labels= names( peelClasses)) thumbDf at data$sec <- factor(thumbDf at data$sec, levels=c(0:8), labels= names( peelClasses)) stack() comes from library(raster), which does not do lattice natively and doesn't plot thematic maps particularly well, AFAIK. Coercing the data to something that spplot() can handle and changing the thematic data to factors results in a very satisfactory legend for that theme. I would like the third map to have the same size so that they more closely resemble a set of panels even though they have different themes. I have experimented with three approaches: thu...
2014 May 06
3
Mapa de quantiles con spplot
Hola, El problema con la propuesta de Olivier es que los intervalos son diferentes para cada variable. La forma sencilla y rápida es: spplot(zm["part88"], col.regions=plotclr, at=class$brks) Pero para que quede más elegante hay que dar algunos pasos más: ## Intervalos en forma character op <- options(digits=4) tab <- print(class) options(op) intChar <- names(tab) ## Indice de correspondencia entre elemento e interva...
2011 Mar 05
3
Change panel background color in spplot()
Hi! How does one change the background color of the map-panel in spplot()? Example: library(sp) data(meuse.grid) gridded(meuse.grid) = ~x+y spplot(meuse.grid, "part.a") How would I get another background-color for the map-panel (but not for the whole plot) here? Thank you! Marcel
2011 Jul 13
3
adding text to spplot
hi all, I have a plot to which i would like to add text labels. And i cant find a way...here is the code : enaD2<-idw(D2~1, loca=dva, newdata=grd) pts = list("sp.points", dva, pch = 20, cex=1.5, col = "darkred spplot(enaD2, "var1.pred",sp.layout=pts, main = "globina 60 cm", sub="D2", col.regions=terrain.colors(64), contour=T) text information is in ena$ime field, regards, m [[alternative HTML version deleted]]
2011 Mar 04
2
make an own (different) color legend with spplot()
Hi! Is there a way to manually costumize the color legend in an spplot() - especially where to draw ticks and labels for the ticks? The reason I'm asking: Usually spplot() automatically divides the data into fitting slices and makes a color legend (also automatically). I want to assign the slices myself and have a fixed scale instead of an automatic/dynamic s...
2007 Oct 05
1
using spplot (sp package) with 5 quantiles
Hi, I'm using R 2.5.1 and gstat 0.9-39 library and I'm working with the jura data set provided by gstat library. I tried to plot a graph of metal concentrations (let's say Cd) with the command spplot, but I realized that the default lags are equally distributed between Min and Max. I did: library(gstat) data(jura) jura.pred.xy <- jura.pred names(jura.pred.xy)[1:2] <- c("x", "y") coordinates(jura.pred.xy) <- ~x+y spplot(jura.pred.xy, scales=list(draw=TRUE), xlab=&qu...
2009 Sep 27
1
Select.spatial on spplots
Hi everyone. I posted this on R-sig-geo but got no response. Can select.spatial() be used in an existing spplot? I have tried selecting points (eq) from a plot generated from sp. However, when I invoke select.spatial(eq). It generates only the points without the background containing the faults. I need the background to select which earthquakes coalesce on which fault. Is there an alternative? eq.pts<-li...
2014 Feb 06
2
Consulta spplot
Buenas tardes, Estoy probando a leer archivos netcdf (como raster stack) y crear animaciones de datos de modelos climáticos y estaba utilizando para generar las imágenes spplot(). Estás imágenes tienes superpuestas varias capas de imagenes, el mdt de base, nubosidad, precipitación y nieve. Mi pregunta es la siguiente,¿es posible visualizar la leyenda de cada una de las capas? Actualmente solo visualizo la de la capa base, el mdt. base<-spplot(mdt,col.regions=colMDT,...
2011 Oct 21
0
add=TRUE or similar in spplot?
Dear Helper, I have a spatial lines data frame object 'spRiverDf'. The data frame consists of numbers {0,1,...,5}. And I have a vector 'colorS' of length 6 with different colours. If I make a plot with spplot I get a plot of the lines - colours depending on there number in the data frame column: spplot(spRiverDf['data.col.1'], zcol=..., names.attr=..., col.regions=colorS, lwd=10) # (A) My problem: - I'd like to overlay narrow lines (lwd=5) with the appropriate colors of a second data colum...
2010 Sep 27
1
spplot cuts
Hello- After looking through ?spplot, I would expect that I could specify the values of the cuts: "...?cuts? number of cuts or the actual cuts to use..." So in the following command, spplot(lzm.krige.dir["var1.pred"], scales=list(draw=TRUE), xlab="Easting",ylab="Northing", cuts=seq(0.0,0.4...
2014 Mar 12
3
Sobreponer dos mapas
...border=?gray?) addLines(zonas, col=?red?) Este es el resultado: https://www.dropbox.com/s/1286j3ppk6nyve6/zonas.tiff Ahora lo que deseo hacer es agregar datos, por ejemplo el cociente de localización de la industria de la electronica para cada municipio de las zonas. Anteriormente lo he hecho con spplot, pero primero agregando los datos a traves de: zm <- readOGR(?.?, ?zm?) datos <- read.csv(ql.csv) #cocientes de localización por sector por municipio (345 obs) zonas en data=data.frame(datos) y después lo he pintado así: spplot(zonas, c(?industria_electronica?)) Este es el resultado: ht...
2013 Jan 19
1
Is it possible to create color ramp legend in spplot for discontinuous data ?
Hello All, I have a discontinuous dataset and I used spplot to plot the points. I was wondering whether it is possible to show the legend of the plot as color ramp. I saw that on continuous data. If anyone could tell me that would be great. Another thing I would like to know is how can we create the horizontal legend. By default, the legend is vertical....
2015 Apr 02
2
Mapas con spplot
Hola He hecho el típico mapa con gadm y spplot: library(sp) ES <- local(get(load(url("http://biogeo.ucdavis.edu/data/gadm2/R/ESP_adm2.RData ")))) acerco las canarias: A <- which(ES en data$NAME_1 == "Islas Canarias") L <- length(ES en polygons[[A]]@Polygons) L <- length(ES en polygons[[A]]@Polygons) for (i i...
2007 Oct 08
1
do not plot polygon boundaries with spplot {sp}
Hi, Is there a simple way to suppress the plotting of polygon boundaries with spplot() ? # simple list of 12 colors cols <- brewer.pal(12, "Paired") # plot pile of polygons, with 12 classes: spplot(x, zcol='class2', col.regions=cols, scales=list(draw=T), xlab="Easting (m)", ylab="Northing (m)") ... seems to work well. However the polygon...
2011 Mar 02
0
spplot() - costumize the color-legend
Hi! Is there a way to manually costumize the color legend in an spplot() - especially where to draw ticks and labels for the ticks? The reason I'm asking: Usually spplot() automatically divides the data into fitting slices and makes a color legend (also automatically). I want to assign the slices myself and have a fixed scale instead of an automatic/dynamic scal...
2012 Feb 15
0
spplot settings
I want to use spplot function for plotting data on wold map spplot.points(obj, zcol = names(obj), ..., names.attr, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, aspect = mapasp(obj,xlim,ylim), panel = panel.pointsplot, sp.layout = NULL, identify = FALSE, formula, xlim = bbexpand(bbox(obj)[1, ], 0.04),...