briandk/granovaGG — Issue #146: print.four.plots.per.page seems problematic
Author: briandk
Created: 2012-02-22 23:48:33+00:00
State: open
Labels: Bug, contr

@rmpruzek writes:

> One thing I tried that seemed not to work concerned the arg (setting)
> print.four.plts.per.page=FALSE
>
> in granova.ds. The result seemed identical to that w/ the setting TRUE (default).
> Am not sure what I should have expected

Without sample code, it's hard to diagnose the problem. From a quick scan of what you say you did, my guess is that you misspelled "plots" in the argument.

I created [a sample script][1] to demonstrate the difference you *should* see. When executed, the script will place two files on your desktop:

* BrianTest1.pdf, which should output when `print.four.plots.per.page = TRUE`
* BrianTest2.pdf, which shows what happens when `print.four.plots.per.page = FALSE`

[![Comparing print four plots per page TRUE/FALSE][2]][2]

[The script][1] is also reproduced for convenience below:

```r
library(granovaGG)

# Explicitly printing four plots per page
pdf(file="~/Desktop/BrianTest1.pdf", onefile = TRUE)
data(rat)
fake.contrasts <- matrix(c(1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -2,
1, 1, -2, -1, 1, 0, 1, -1, 0, 1, 1, -2, -1, -1, 2), ncol = 5)
fake.contrasts <- fake.contrasts[ ,1:3]

granovagg.contr(data = rat[ ,1],
contrasts = fake.contrasts,
print.four.plots.per.page = TRUE
)
""
dev.off()

# Setting print.four.plots.per.page to FALSE
pdf(file="~/Desktop/BrianTest2.pdf", onefile = TRUE)
granovagg.contr(data = rat[ ,1],
contrasts = fake.contrasts,
print.four.plots.per.page = FALSE
)
dev.off()
sessionInfo()
```

/cc @WilDoane

[1]: https://gist.github.com/1888374
[2]: http://briandk.com/screenshots/PrintFourPlotsPerPage-20120222-184355.png