baptiste / gridExtra

Miscellaneous Functions for "Grid" Graphics
http://cran.r-project.org/web/packages/gridExtra/index.html
15 stars 4 forks source link

what if(!is.unit(heights)) or if(!is.unit(widths)) in arrangeGrob() ? #7

Closed bastistician closed 9 years ago

bastistician commented 9 years ago

Previously, heights and widths were allowed to be simple numeric vectors because arrangeGrob() internally called grid.layout() which did:

if (!is.unit(widths)) 
    widths <- unit(widths, "null")
if (!is.unit(heights)) 
    heights <- unit(heights, "null")

I think this automatic conversion to grid units is a convenient feature and suggest to include the above code in the new version of arrangeGrob(). This would also break less code of packages depending on gridExtra. I could prepare a pull request if necessary.

baptiste commented 9 years ago

thanks for the suggestion, I've added this to arrangeGrob