[R] aligning column of xyplots and removing space between them

Deepayan Sarkar deepayan.sarkar at gmail.com
Wed Oct 12 22:40:23 CEST 2005


On 10/11/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> On 10/11/05, Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote:
> > On 10/11/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> > > Thanks.  That works although the alignment is still not perfect.
> > > I am attaching the saved image in both .png and .emf formats
> > > so you can see what I mean.  Its not far off but its noticeable.
> > >
> > > In .emf format a portion of the bounding box does not come out
> > > either and it comes out bluish rather than white.  Not sure if such
> > > attachments can survive the list but I have sent you a copy too just
> > > in case.
> >
> > [I have no way to easily view the emf file, but] I can't see any
> > reason for the misalignment in the PNG file (other than a driver or
> > rendering bug). Do you see it in PDF output as well?
>
> Yes, it can be seen on the PDF version too (see attached).

Right. Looks like the horizontal paddings are to blame now. The
defaults are in terms of  "snpc" units, which produce different
physical units. The simplest workaround is to set them to 0 too, e.g.

theme.novpadding <-
  list(layout.heights =
       list(top.padding = 0,
	    main.key.padding = 0,
	    key.axis.padding = 0,
	    axis.xlab.padding = 0,
	    xlab.key.padding = 0,
	    key.sub.padding = 0,
	    bottom.padding = 0),
       layout.widths =
       list(left.padding = 0,
	    key.ylab.padding = 0,
	    ylab.axis.padding = 0,
	    axis.key.padding = 0,
	    right.padding = 0))

-Deepayan




More information about the R-help mailing list