Displaying 5 results from an estimated 5 matches for "mapasp".
Did you mean:
mapas
2005 Mar 30
1
help with plotting a grid on levelplot
I'm trying to plot a grid over a levelplot
print( levelplot( var1.pred~x+y,
data=saw.pred,
aspect=mapasp(saw.pred),
col.regions=terrain.colors(80),
main=main) )
using the data...
> saw.pred
x y var1.pred var1.var sort
1 5 5 3.3761200 256.3363 saw
2 15 5 3.3884142 499.5695 saw
3 25 5 3.5394769 362.5490 saw
4 35 5 3.6386983 439.3200...
2006 Jan 11
2
Levelplot not working from file
...Here is the code:
library(sp)
library(gstat)
library(lattice)
gatherData <- read.table("~/gather.txt", header = TRUE)
grd = makegrid(gatherData$x, gatherData$y, cell.size = 5)
k <- krige(z~x+y, ~x+y, data = gatherData, newdata = grd, nmax = 5)
levelplot(var1.pred~x+y, k, aspect = mapasp(k), main = "Predicted 5m")
It executes fine (it plots up) when I cut and paste to the command
prompt but it seems to be missed (nothing occurs) when I call the
source file.
I am using OSX.
Thanks for any help.
Matt
[[alternative text/enriched version deleted]]
2012 Jul 12
2
trellis margin sizes in absolute units
...: (mp is a SpatialPixelsDataFrame)
xlim <- c(.96*bbox(mp)[1, 1], 1.02*bbox(mp)[1, 2]);
ylim <- c(.992*bbox(mp)[2, 1], 1.005*bbox(mp)[2, 2]);
b <- 1; t <- 2; # b, t : should be bottom and top figure margins
l <- 1; r <- 6; # l, r : should be left and right figure margins
asp <- mapasp(data=mp, xlim=xlim, ylim=ylim);
# I have set the width of the device region as w millimetres and here I calculate
# its height, taking care of the aspect ratio
h <- b + t + asp*(w - (l + r));
postscript(output, onefile=FALSE, paper="special", width=w/25.4, height=h/25.4, horizontal=F...
2005 Sep 10
1
transparent backgound in lattice plots
...ot;, bg="transparent" )
main=expression( paste( "Optimal Harvest Pattern ", widehat(V)[saw], ", in
", m^3 ) )
labs <- paste( rep( "Day", 12 ), 1:12 )
opt.harv.pat.pred <- levelplot( var1.pred~x+y,
data=saw.comb,
aspect=mapasp(saw.comb),
col.regions=terrain.colors(80),
main=main,
panel = function(...) {
panel.levelplot(...)
panel.grid(h=-1, v=-1, col="black", lwd=2)
panel.text( from.x[par[1:12]],...
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), ylim = bbexpand(bbox(obj)[2, ],
0.04))
in this function I would like to set xlim ,ylim (-180,180 & -90 ,90) and
color ranges.
so any body knows how add in to spplo...