I am trying to plot samples and chromosomes as row and columns using facet grid in ggplot. My problem is that each facet is very small given that I have 25 chromosomes and many samples. Is there a way to plot each facet with its actual size and scroll horizontally and vertically across samples and chromosomes ? Here is my code
seg <- read.table("tmp.seg")
head(seg)
id chr start end test ref log2
2 114F chrY 9992443 10038173 2654 3818 -0.03
3 114F chrY 9969577 10015307 460 1286 -0.99
4 114F chrY 9946711 9992441 497 1348 -0.94
5 114F chrY 9923845 9969575 537 1254 -0.73
6 114F chrY 9900979 9946709 1040 2667 -0.86
7 114F chrY 9878113 9923843 700 2021 -1.03
p <- ggplot(seg) + geom_segment(aes(x=seg$start,y=seg$log2,xend=seg$end,yend=seg$log2,color=seg$log2),size=1) +
facet_grid(id~chr,scales="free_x") +
scale_color_gradient(limits=c(-1,1),low="blue", high="red") +
theme(panel.background=element_rect(fill="white")) + ylim(c(-2,2))
The results looks like this
As you can see, the facet shrink the plot in which all the details inside disappear. I want to know how to make a high resolution plot in which one can scroll horizontally and vertically to see each chromosome at each sample in high details.
Thanks in advance

ggsave("my_plot.pdf", plot = p, height = 18, width = 42, units = "in")should be plenty big enough. - Gregor Thomas