title: Grid Graphics Representation Problem in R-Studio
body: <p>I am working with that <a href="https://www.stat.auckland.ac.nz/%7Epaul/RGraphics/chapter5.pdf" rel="nofollow noreferrer">book</a> and <code>R-Studio</code>. I tried to render a grid graphic as described in the book:</p>
  <pre><code>library(grid)
  
  pushViewport(plotViewport(c(5, 4, 2, 2)))
  pushViewport(dataViewport(pressure$temperature,pressure$pressure,name=&quot;plotRegion&quot;))
  
  
  
  grid.points(pressure$temperature, pressure$pressure,name=&quot;dataSymbols&quot;)
  grid.rect()
  grid.xaxis()
  grid.yaxis()
  
  grid.text(&quot;temperature&quot;, y=unit(-3, &quot;lines&quot;))
  grid.text(&quot;pressure&quot;, x=unit(-3, &quot;lines&quot;), rot=90)
  
  grid.edit(&quot;dataSymbols&quot;, pch=2)
  
  upViewport(1)
  grid.rect(gp=gpar(lty=&quot;dashed&quot;))
  downViewport(&quot;plotRegion&quot;)
  grid.text(&quot;Pressure (mm Hg)\nversus\nTemperature (Celsius)&quot;,x=unit(150, &quot;native&quot;), y=unit(600, &quot;native&quot;))
  </code></pre>
  <p>When running that code, it looks like the following:
  <a href="https://i.stack.imgur.com/Gtf1k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gtf1k.png" alt="enter image description here" /></a></p>
  <p>According to the book, the result should look like this</p>
  <p><a href="https://i.stack.imgur.com/q3hIm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q3hIm.png" alt="enter image description here" /></a></p>
  <p>What do I wrong? Was also running <code>dev.off()</code> without any effect....</p>
  <p>I have access to the dataset <code>pressure</code></p>