1

I am having a problem with lining up my krig maps side by side. I've tried split.screen, par(mfrow()) and par(mfcol()) to no avail. The same problem occurred when trying to line up spatial point patterns... I'm using a bunch of packages to produce these graphs so maybe that's the problem.

This is my code. Pretty simple stuff that hasn't caused me problems in the past

library(Rcmdr)
library(sp)
library(gstat)
library(geoR)
library(tcltk)
library(spatstat)
library(sgeostat)

x11()
par(mfrow=c(2,3))
plot(K20)
plot(K60)
plot(K90)
par(mfrow=c(1,1))

Thanks! nm

www
  • 38,575
  • 12
  • 48
  • 84
nick m
  • 33
  • 6
  • 1
    what are these objects you are using in `plot`? – rawr Apr 29 '16 at 20:17
  • spplot(pkB90["var1.pred"], xlab="Easting (m)", ylab="Northing (m)", scales = list(draw = TRUE), xlim=c(0,100), ylim=c(0,400), main = "Ordinary point kriging estimates \n for tree biomass (kg) in 1990") -> K90 – nick m Apr 29 '16 at 20:21
  • They are all the sam except they for the year – nick m Apr 29 '16 at 20:21
  • 1
    those plots use a different graphics system, try something like `library('gridExtra'); grid.arrange(K20, K60, K90, ncol = 3)` or something like http://stackoverflow.com/questions/2540129/lattice-multiple-plots-in-one-window – rawr Apr 29 '16 at 20:28
  • that did it. thank you kindly – nick m Apr 29 '16 at 20:46
  • one more question for you: how did you know that these pkgs use another graphics system? – nick m Apr 29 '16 at 20:50
  • heh, interesting question. well `?spplot` says that it is a "Lattice (trellis)" plotting method, and `class(K20)` will return "trellis", but you still would have to know what those are. `lattice` is a type of graphic/package built on the `grid` graphics package like `ggplot` is, so objects of those classes need to use different methods than base – rawr Apr 29 '16 at 22:32

0 Answers0