I am trying to replicate the following plot using Lattice:

 

  http://addictedtor.free.fr/graphiques/graphcode.php?graph=78

 

I'm having trouble with the lattice equivalent of the "oma" (outside
margin) setting.  I've been all through the Lattice documentation and
others and also searched the lists.

 

Below is sample code that demonstrates where I'm at (it should paste and
run within an R command prompt.  I'm running 2.8.1):

 

THANKS!!!

 

<snip>

 

library(lattice)

library(grid)

 

v1 = viewport(

   width=unit(0.8,"npc"),

   height=unit(0.8,"npc"),

   just=c("left","bottom"),

   x=unit(0.0,"npc"),

   y=unit(0.0,"npc"),

   name="v1"

)

v2 = viewport(

   width=unit(0.8,"npc"),

   height=unit(0.2,"npc"),

   just=c("left","bottom"),

   x=unit(0.0,"npc"),

   y=unit(0.8,"npc"),

   name="v2"

)

v3 = viewport(

   width=unit(0.8,"npc"),

   height=unit(0.2,"npc"),

   just=c("left","bottom"),

   x=unit(0.8,"npc"),

   y=unit(0.8,"npc"),

   angle=-90,

   name="v3"

)

 

 

pushViewport(v1)

grid.rect()

print(

  xyplot(

    NOx ~ E,

    data=ethanol,

  ),

  newpage=FALSE

)

upViewport();

 

pushViewport(v2)

grid.rect()

print(histogram( ethanol$E ),newpage=FALSE)

upViewport()

 

pushViewport(v3)

grid.rect()

print(

  histogram( ethanol$NOx ) ,

  newpage=FALSE

)

 

 


	[[alternative HTML version deleted]]


