library(plotly)
library(ggcyto)
gs <- load_gs("~/rglab/workspace/analysis/Lyoplate_new/output/gated_data/auto/gslist-tcell/D54tFo7RPl/")
gs <- subset(gs, Replicate %in% 1:2)

2d hexbin

p1 <- autoplot(gs, "CD4") + facet_grid(Sample~Replicate)
p1

p1 <- as.ggplot(p1)
ggplotly(p1)

1d density

p2 <- ggcyto(gs, aes(x= "CD3"), subset = "Live") + geom_density() + geom_gate() + geom_stats()
p2

p2 <- as.ggplot(p2)
ggplotly(p2)
## Warning in layer2traces(L, df, misc): Conversion not implemented for
## geom_hvline (basic geom_hvline), ignoring. Please open an issue with your
## example code at https://github.com/ropensci/plotly/issues
## Warning in layer2traces(L, df, misc): Conversion not implemented for
## geom_popStats (basic geom_popStats), ignoring. Please open an issue with
## your example code at https://github.com/ropensci/plotly/issues