let's say my data is
dat1 <- data.frame(group=c("a", "a","a", "a", "a", "b", "b", "b","b","b","b","b","c","c","c"),subgroup=c(paste0("R", rep(1:5)),paste0("R", rep(1:7)),paste0("R", rep(1:3))),
value=c(5,6,0,8,2,3,4,5,2,4,7,0,3,4,0),pp=c("AT","BT","CT","AA","AT","TT","RT","CC","SE","DN","AA","MM","XT","QQ","HH"))
When I use following code :
pl <- ggplot(dat1, aes(y = as.character(pp), x = as.factor(subgroup))) +
geom_point( aes(size=as.numeric(value)))+ facet_grid(cols = vars(group))+
ylab("names") +xlab(" ")
pl
My figure is attached as "Denemeplot". But I want to add some cut off as
dat1 <- dat1[dat1$value >2 , ] and
pl <- ggplot(dat1, aes(y = as.character(pp), x = as.factor(subgroup))) +
geom_point( aes(size=as.numeric(value)))+ facet_grid(cols = vars(group), scales="free", space="free")+
ylab("names") +xlab(" ")
pl
My figure is now as "denemeplot2"
But I want to all values with scales of each panel also even if zero. For example in the second plot, the first panel has five value, so I want to see all scale in the first panel, etc.
How can I make this plot?
Thanks,
Anil