Displaying 20 results from an estimated 4000 matches similar to: "[lattice] how to overlay a geographical map on a levelplot?"
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2012 Nov 18
2
[lattice] format and rotation of strip text
Thanks to the lattice gurus on this list, and having reference to the
excellent open-access Sarkar 2008
ISBN 978-0-387-75968-5
e-ISBN 978-0-387-75969-2
http://dx.doi.org/10.1007/978-0-387-75969-2
I now know how to label lattice panels by variable value: see thread
starting @
https://stat.ethz.ch/pipermail/r-help/2012-November/329450.html
(and demonstrated below). This allows me to use
2012 Nov 18
2
[newbie] convert 3D spatial array to dataframe
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get)
to a dataframe suitable for use by lattice::levelplot(), e.g.,
levelplot(conc ~ lon * lat | lev, data = data.frame)
details:
I have atmospheric data in netCDF files specifying gas concentrations
over a 3D space with dimensions longitude, latitude, and (vertical)
level. I need to plot the data by level. Since there are
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
2012 Aug 09
2
How to overlay a global map on a filled contour?
I would like to plot some lat-lon data in a filled contour, and then
overlay a map of the globe on top. I am trying something like this:
filled.contour(lons, lats, glb.data,
plot.axes={axis(1);axis(2);map(projection='rectangular',parameters=0,add
=T)}
)
The filled contour plots fine, and the map shows up, but only as a very
tiny little black rectangle in a small area of the
2006 Nov 20
2
problem with loop to put data into array with missing data for some files
Dear R-help community,
My main goal of this message is to find a way of skipping a file of a month/year
in a loop that does not exist (and making it's output into an data.out array
would be NA) and moving onto the next year/month in the loop to carry on filling
data.out with real precipitation data.
The situation so far:
I downloaded 50 years worth of GRIB data files from the NCEP data
2011 Nov 15
1
equal spacing of the polygons in levelplot key (lattice)
Given the example:
R> (levs <- quantile(volcano,c(0,0.1,0.5,0.9,0.99,1)))
0% 10% 50% 90% 99% 100%
94 100 124 170 189 195
R> levelplot(volcano,at=levs)
How can I make the key categorical with the size of the divisions equally spaced in the key? E.g., five equal size rectangles with labels at levs c(100,124,170,189,195)?
Apologies if this is obvious.
-A
R> version
2006 Nov 20
3
problem with loop to put data into array with missing data forsome files
Hi Jenny
If you want a general solution I understand.
However I just downloaded the file fine (as far as I can tell) so you
are welcome to have a copy. I can email it to you if you want.
I do not think your test for NA is valid. i.e
if(test != "NA"){
}
I think you should use
if(is.na(test)){
}
Or something similar.
J
---
John Seers
Institute of Food Research
Norwich
2012 May 29
1
lattice: add a marginal histogram on top of the colorkey of a levelplot?
Lattice experts:
Can you think of a way to produce a levelplot as below and then add a histogram of the z variable to the top margin of the plot that would sit on top of the color key?
x <- seq(pi/4, 5 * pi, length.out = 100)
y <- seq(pi/4, 5 * pi, length.out = 100)
r <- as.vector(sqrt(outer(x^2, y^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- cos(r^2) *
2004 Jun 14
1
Piecharts in a graph
Dear R-Community.
I am trying show pie charts on a graph. To be precise, I have series of
catch calues by species by geographic (5 deg by 5 deg) regions. I want
to draw circles (actually pie charts showing the proportion of the catch
in each area) so that I have a graph of catch by species by geographic
area!
I know there is the < symbols(dat$lon,dat$lat,circles = dat$sp1,
add=TRUE) > but
2010 Apr 21
1
overlaying a levelplot on a map plot
I've generated a levelplot showing the density distribution of a species
derived from survey transects, with lon, lat co-ordinates.
I'd like to overlay this on a map of the study region specified by:
map('worldHires', xlim = range(mlon), ylim = range(mlat)), where mlon, mlat
specifies the study region.
I've tried plotting the map first, then using the options: 'add=TRUE,
2008 Jun 02
6
significant digits (PR#9682)
I came to report this same bug and found it already in the trash, but
I slightly disagree with that assessment. If it's not a bug, then
perhaps it's a feature request. Comments at the end.
On Mon, May 14, 2007, Duncan Murdoch wrote:
>>On 13/05/2007 8:46 PM, scott.wilkinson at csiro.au wrote:
>>
>> In the example below round() does not report to the specified number of
2002 May 24
5
intersecting polygons and conversion from decimal degree to km
Dear all,
1. How can I compute the intersecting area between 2 polygons ?
2. I have polygons with coordinates in decimal degrees (i.e. 13 deg 30
min = 13.5 decimal degrees). I want to compute their area and get the
results in square meters or square kiometers. Can anyone give me a
conversion coefficient or a pointer where I can find this information
(sorry for this off topic question) ?
Thanks
2008 Feb 06
1
Levelplot of percentages always using 0 to 100 in the color scheme
I am trying to create levelplot's of cpu usage for systems.
print(levelplot(util.mean ~ x.hour * x.day, colorkey=T, cut=20,
scales=list(x=list(at=seq(0,96,length=25),
labels=ifelse(seq(0,24) %% 4 == 0, seq(0,24), ''))), # add
tick marks at the hour
main="CPU Utilization During November on idnprod",
2006 Nov 23
3
reaccessing array at a later date - trying to write it to file
Dear R-help community
I am trying to write an R object (data.out) to a file in order to re-access it
later and not have to re-load up the array with data every time. Here is the
form of data.out
> data.out <- list(lats=seq(88.542, -88.542, length=94),
lons=seq(0, 360-1.875, length=192),
date=vector(length=nyr*12),
data=array(NA, c(nyr*12, 94*192))
)
I tried
>
2004 Jul 21
2
2 images with 2 color scales on one graphic device. How to get it?
Hi!
Would like to plot two image plots with color scale (like levelplot (lattice) implements) in one graphic device.
Tried to plot 2 levelplot's (lattice) (the data has not much in common) in one graphics device by setting par(mfrwo=c(2,1)) which does not work.
Is there a way to force levelplot to use only a half of the graphic device?
Is there a function like image which provides the color
2008 Jul 04
1
kriging problem(?)
Hei,
I have two spatial datasets Sa and Sb, both with lat-lon coordinates and
from same geographic area, but from different localities within the area
(independent samples). Sa is biotoc data, Sb is some environmental
parameter (fertility). I 'know' that Sb affects Sa, but wonder on which
scale. I tried different interpolations by creating different grids of Sb
(e.g. 20x20 and 100x100
2004 Aug 10
1
date axes and formats in levelplot
Hi all (and particularly Deepayan),
A while back Deepayan helped me with the query in the text below (thanks
again). Specifically it was about changing the way that dates plotted on
the axes of lattice plots.
While this works using xyplot, everything comes apart when I use
levelplot. The axis labels on the date axis are shown as the integer
representation of the date (number of seconds since
2002 Dec 01
1
generating contrast names
Dear R-devel list members,
I'd like to suggest a more flexible procedure for generating contrast
names. I apologise for a relatively long message -- I want my proposal to
be clear.
I've never liked the current approach. For example, the names generated by
contr.treatment paste factor to level names with no separation between the
two; contr.sum simply numbers contrasts (I recall an