r - Include unused factor levels in facets with ggplot2 -
is there way include panel unused levels of factor used in faceting?
the reason want because i'm arranging several separate plots in rows showing different measures, each row having same number of facet_grid
panels in columns. each plot should line column.
but when data 1 of rows missing data particular facet level, number of panels different , columns not line up. example, notice last row missing "mathematics ii" panel:
example plot http://dl.dropbox.com/u/14792859/ggplot2%20facet%20levels.png
the work-around can think of include dummy data-point missing facet levels, love hear there easier/cleaner way.
as ben bolker mentioned, appears bug in ggplot2 caused bug in plyr. slated fixed in upcoming plyr 1.5 release.
in meanwhile, worked around issue creating single plot , using facet_grid, rows specifying different measures plotted. problem can't specify different scale_fill_manual 2 bottom panels, used stroke color middle panel instead -- not ideal enough now.
thanks ben figuring out , starting mailing list conversation.
Comments
Post a Comment