similar to: add single points to a level plot

Displaying 20 results from an estimated 3000 matches similar to: "add single points to a level plot"

2018 Mar 08
0
add single points to a level plot
Hi all, I ran the code: > s <- stack(replicate(2, raster(matrix(runif(100), 10)))) > xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)), + z1=runif(10), z2=runif(10)) > levelplot(s, margin=FALSE, at=seq(0, 1, 0.05)) + + layer(sp.points(xy, pch=ifelse(pts$z1 < 0.5, 2, 3), cex=2, col=1), columns=1) + + layer(sp.points(xy, pch=ifelse(pts$z2 < 0.5, 2,
2018 Mar 08
1
add single points to a level plot
You need to load the package 'rasterVis' > library(rasterVis) HTH, Eric On Thu, Mar 8, 2018 at 5:11 PM, lily li <chocold12 at gmail.com> wrote: > Hi all, > > I ran the code: > > s <- stack(replicate(2, raster(matrix(runif(100), 10)))) > > xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)), > + z1=runif(10), z2=runif(10))
2018 Jan 16
2
Steps to create spatial plots
Hi Bert, I think you are correct that I can use levelplot, but I have a question about converting data. For example, the statement: levelplot(Z~X*Y), Z is row-wise from the lower left corner to the upper right corner. My dataset just have gridded Z data as a txt file (or can be called matrix?), how to convert them to the vector in order for levelplot to use? Thanks. On Mon, Jan 15, 2018 at 6:04
2018 Jan 16
3
Steps to create spatial plots
Hi Roman, Thanks for your reply. For the spatial coordinates layer, I just have coordinates of the upper left corner, numbers of rows and columns of the spatial map, and grid cell size. How to create a spatial layer of coordinates from this data? Thanks. On Mon, Jan 15, 2018 at 3:26 PM, Roman Lu?trik <roman.lustrik at gmail.com> wrote: > You will need to coerce your data into a
2018 Jan 16
0
Steps to create spatial plots
Sorry for the emails, I just wanted to have an example. layer$z 1 1 3 4 6 2 2 3 4 1 2 9 1 4 5 2 1 8 How to convert the matrix to layer$z = c(1, 4, 5, 2, 1, 8, 2, 3, 4, 1, 2, 9, 1, 1, 3, 4, 6, 2)? I think this vector is the order that levelplot can use. Thanks again. On Mon, Jan 15, 2018 at 10:58 PM, lily li <chocold12 at gmail.com> wrote: > Hi Bert, > > I think
2018 Jan 16
1
Steps to create spatial plots
If layer$z is a matrix and you want to reverse the order of the rows, you can do: n <- nrow(layer$z) layer$z <- layer$z[ n:1, ] HTH, Eric On Tue, Jan 16, 2018 at 8:43 AM, lily li <chocold12 at gmail.com> wrote: > Sorry for the emails, I just wanted to have an example. > layer$z > > 1 1 3 4 6 2 > 2 3 4 1 2 9 > 1 4 5 2 1 8 > > How to convert
2018 Jan 16
0
Steps to create spatial plots
>From your description, I am **guessing** that you may not want a "spatial map" (including projections) at all, but rather something like a level plot. See ?levelplot in the lattice package for details. Both I am sure ggplot2 has something similar. Apologies if I havemisunderstood your intent/specifications. Cheers, Bert Bert Gunter "The trouble with having an open mind is
2014 Jun 10
2
Como controlar la altura de "colorkey" en levelplot de RatserVis
Hola miembros de la lista, Estoy utilizando la función levelplot del paquete rasterVis para graficar un raster y quiero controlar la altura de la referencia de color (colorkey) del mapa, pero cuando cambio valores en el argumento "height" no parece provocar cambios. Alguna idea de por qué no está funcionando? > cobertura class : RasterLayer dimensions : 780, 1296, 1010880
2013 Feb 13
1
[lattice] display a projected map on a layerplot
summary: I can display a lon-lat map on a lattice::layerplot, and I can display a Lambert conformal conic (LCC) map on a spam::image, but I can't display an LCC map on a lattice::layerplot. Example follows. What am I doing wrong? details: I've been using `lattice` (via `rasterVis`) successfully to display global atmospheric data, which works well enough (though I am definitely intrigued
2018 Jan 15
4
Steps to create spatial plots
Hi users, I have no clear clue about plotting spatial data. For example, I just have a table with attribute values of each grid cell, such as elevation. Then I have coordinates of the upper left corner in UTM, the number of rows and columns, and grid cell size. How to create spatial plot of elevations for the grid cells, in color ramp? Should I create a spatial grid layer with all the polygons
2018 Jan 15
0
Steps to create spatial plots
You will need to coerce your data into a "spatial" kind, as implemented in `sp` or as of late, `sf` packages. You might want to give the vignettes a whirl before you proceed. Roughly, you will have to coerce the data to Spatial* (you could go for a point, raster or grid type, I think) and also specify the projection. Once you have that, plotting should be handled by packages. Here are a
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
SUMMARY: Specific problem: I'm regridding biomass-burning emissions from a global/unprojected inventory to a regional projection (LCC over North America). I need to have boundaries for Canada, Mexico, and US (including US states), but also Caribbean and Atlantic nations (notably the Bahamas). I would also like to add Canadian provinces and Mexican states. How to put these together? General
2017 Aug 06
2
about saving format
In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com> wrote: > > > On 6 Aug 2017, at 03:01, lily li <chocold12 at gmail.com> wrote: > > > > I am using the plot() function, but have a problem.
2012 Oct 29
3
How can I map numbers to colours with raster?
This code will read binary file and display it as a map. may problem is that this code is using a continuous colour scheme, even though I have discrete data (which is a classification scheme). How can I map numbers to colours with raster? Please require(raster) conne <- file("C:\\lai.bin", "rb") sd<- readBin(conne, integer(), size=1, n=360*720, signed=F)
2017 Jul 16
2
About doing figures
Hi Jim, For true color, I meant that the points in the figure do not correspond to the values from the dataframe. Also, why to use rainbow(9) here? And the legend is straight in the middle, is it possible to reformat it to the very bottom? Thanks again. On Sun, Jul 16, 2017 at 2:50 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi lily, > As I have no idea of what the "true
2017 Aug 06
2
about saving format
If the OP is using RStudio and not using R (i.e. pdf()) directly, it sounds like this query should be directed to RStudio support, not here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Aug 5, 2017 at 5:54 PM, Ismail
2017 Jul 16
0
About doing figures
For more than 10 records, how to reformat the colors? Also, how to show the first legend only, but at the bottom, while the second legend in your code is not necessary? In all, the same A values have the same color, but different symbols in DF==1 and DF==2. Thanks for your help. On Sun, Jul 16, 2017 at 9:28 AM, lily li <chocold12 at gmail.com> wrote: > Hi Jim, > > For true color,
2018 Feb 16
2
error in loading rgdal package
Hi R users, Could you help me to see this problem? I could now load "rgdal" even though I downloaded the compressed folder. Thanks for your help. Loading required package: sp Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/libs/rgdal.so': [[alternative HTML version deleted]]
2012 Apr 03
4
R+netcdf, resultados de WRF
Saludos estimados usuarios ! Estoy recién iniciándome en R y no he encontrado ejemplos de cómo graficar los archivos netcdf que genera el modelo meterológico WRF. ¿Alguien tiene por ahí algunos scripts que me permitan ir interiorizándome en el uso de paletas de colores, mapas y graficas de variables de este modelo? Anteriormente lo hacía vía GrADS, convirtiendo el NetCDf a GRIB, pero con las
2017 Aug 06
0
about saving format
> On 6 Aug 2017, at 03:47, lily li <chocold12 at gmail.com> wrote: > > In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions > > On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com> wrote: > > > On 6 Aug 2017, at 03:01, lily li <chocold12 at