margins=TRUE still broken in 0.8.9?

8 views
Skip to first unread message

Jeff

unread,
Jan 24, 2011, 3:16:45 PM1/24/11
to ggplot2
I want to confirm that margins=TRUE is still broken in ggplot2 0.8.9.
I get an error message for this:

p <- qplot(displ, hwy, data = mpg) + geom_point(); p + facet_grid(cyl
~ drv, margins = TRUE)

Error in class(output[[var]]) <- class(value) :
cannot set class to "array" unless the dimension attribute has
length > 0

Is there a workaround other than one involving pushViewport()? Thanks!

Hadley Wickham

unread,
Jan 29, 2011, 11:44:17 AM1/29/11
to Jeff, ggplot2
Yes, still broken, sorry. You could work around it by using the
add_margins function from plyr to add the margins yourself.

Hadley

> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

Reply all
Reply to author
Forward
0 new messages