title: How to change the size of screens in split.screen mode of R?
body: <p>I want to draw two plots next to each other on a single device. I use <code>split.screen</code>, since it is easy to handle. But, it seems that <code>split.screen()</code> divides the screen equally.</p>
  
  <p>In my case I'd like to have the right column to be slightly narrower. This is because I leave out the axis labels, , which makes the right plot a bit wider than the left plot:</p>
  
  <pre><code>#install.packages("TeachingDemos", dependencies=TRUE)
  library(package="TeachingDemos")
  # ***********************************************************
  #source("subplot_new.R.txt")
  # ***********************************************************
  # data for all 4 plots
  dx = c(1:10)
  dy = c(10:1)
  
  
  toPDF = T
  
  
  if(toPDF) {
    pdf(file="test.pdf", width=10, height=5)
  }
  # split the screen into two columns
  close.screen(all.screens=T)
  split.screen(figs=c(1,2))
  
  # go to screen 1
  # ***********************************************************
  screen(1)
  par(mar=c(4,4,0.1,0.1), las=1)
  plot(x = dx, y = dy)
  
  
  # determine coordinates of subplot region:
  x_left_right = grconvertX(c(0,0.5), from='npc')
  y_bottom_top = grconvertY(c(0,0.5), from='npc')
  # draw rectangle
  rect(
    xleft     = x_left_right[1]
    , xright  = x_left_right[2]
    , ybottom = y_bottom_top[1]
    , ytop    = y_bottom_top[2]
    , col = "#efefef"
  )
  # add a subplot in green
  subplot(
    fun={
      plot(x = dx, y = dy, ann = F)
    }
    , type = "fig"
    , x = x_left_right
    , y = y_bottom_top
    , pars = list(
      fg = "green"
      , mar = c(2,2,0,0)
      )
  )
  
  # go to screen 2
  # ***********************************************************
  screen(2)
  par(mar=c(4,1,0.1,0.1), las=1)
  plot(x = dx, y = dy, yaxt="n")
  axis(side=2, labels=F)
  
  # determine coordinates of subplot region:
  x_left_right = grconvertX(c(0.6,1), from='npc')
  y_bottom_top = grconvertY(c(0.6,1), from='npc')
  # draw rectangle
  rect(
    xleft     = x_left_right[1]
    , xright  = x_left_right[2]
    , ybottom = y_bottom_top[1]
    , ytop    = y_bottom_top[2]
    , col = "#efefef"
  )
  # add a subplot in blue
  subplot(
    fun={
      plot(x = dx, y = dy, ann = F)
    }
    , type = "fig"
    , x = x_left_right
    , y = y_bottom_top
    , pars = list(fg = "blue", mar = c(2,2,0,0))
  )
  
  if(toPDF) {
    dev.off()
  }
  </code></pre>
  
  <p>I thought <code>layout</code> might work, but probably not in my case, since I need to use the subplot command from the TeachinDomes package.</p>
  
  <p>Is there a package similar to <code>split.screen</code> that allows for setting the proportion each column should get from the whole screen? Or is it possible to manipulate the split.screen package tofulfil the task?</p>
  
  <p>I simply want to have the two plots having the same size, without having additional white margins.</p>