Hi Xi,
I found two bugs in ggplot2 from this post.
> #-------------------------------
> library(GGally)
> temp = data.frame("x" = c(0,0,0, rep(1,5), 0,0,1,0,rep(1,7), 0), "y" =
> c(1, 0,0,1,0,1,0,1,0,1,0, rep(1,5), 0, 1,1,0))
> ggally_ratio(temp); table(temp)
> # or
> ggpairs(apply(temp,2,factor), diag = list(discrete = "bar"), lower =
> list(discrete = "ratio"))
> #-------------------------------
I made a work around for the first one. ggplot2 doesn't appreciate it
when you make a rectangle with points outside of the limits. ggpairs
was making some on the limit and ggplot2 still didn't like it. I
moved the limit down by 0.0001 and everything shows up just fine.
> 2. The default off-diagonal plots in the ggpairs for categorical data,
> the lower part is the cell counts plot, what´s in the upper part?
This again is another quirk of ggplot2. If at all possible, never use
column names that are called "x" or "y". By changing the columns of
the dataset to "V1", "V2", everything works fine. ggplot2 does some
amazing eval voodoo but at the cost of column names of "x" and "y".
colnames(temp) <- c("V1", "V2")
ggally_facetbar(temp, aes(x = V2, y = V1))
The latest version of GGally can be found on
www.github.com/ggobi/ggally.
Best,
Barret