My first thought was
library(scales)
ggplot(data_example, aes(y=pub, x=measure))+
geom_tile(aes(fill=used,color=used))+
theme(legend.position="none")+
scale_fill_manual(values=c("white","gray70"))+
scale_color_manual(values=c(alpha("00000000", 0) ,"black"))
but that doesn't quite work because the borders are still partially
obscured by the white tiles. I guess you will have to do something
ugly, like
ggplot(data_example, aes(y=pub, x=measure), color="black")+
geom_tile(aes(fill=used,color=used), size = 0, data =
subset(data_example, used == 0))+
geom_tile(aes(fill=used,color=used), size = 1, data =
subset(data_example, used == 1))+
theme(legend.position="none")+
scale_fill_manual(values=c("white","gray70"))+
scale_color_manual(values=c(alpha("00000000", 0) ,"black"))
Best,
Ista
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ggplot2+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.