Search
Question: Error in .External.graphics(C_layout, num.rows, num.cols, mat, as.integer(num.figures)
0
gravatar for mictadlo
7 weeks ago by
mictadlo0
mictadlo0 wrote:

Hi, I have followed this paper but for my data I got the below error:

> logCPM <- cpm(y, prior.count=2, log=TRUE)
> head(y$genes$genes)
[1] "sp0025247" "sp0025250" "sp0025268" "sp0025270" "sp0025282" "sp0056834"
> y$samples$group
 [1] Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Root_tip.1.5 Leaves.1.5   Leaves.1.5   Leaves.1.5   Leaves.1.5   Root_tip.2  
[10] Root_tip.2   Root_tip.2   Root_tip.2   Leaves.2     Leaves.2     Leaves.2     Leaves.2     Root_tip.3   Root_tip.3  
[19] Root_tip.3   Root_tip.3   Leaves.3     Leaves.3     Leaves.3     Leaves.3    
Levels: Leaves.1.5 Leaves.2 Leaves.3 Root_tip.1.5 Root_tip.2 Root_tip.3
> rownames(logCPM) <- y$genes$genes
> colnames(logCPM) <- paste(y$samples$group, 1:2, sep="-")
> o <- order(tr$table$PValue)
> logCPM <- logCPM[o[1:30],]
> logCPM <- t(scale(t(logCPM)))
> library(gplots)
> col.pan <- colorpanel(100, "blue", "white", "red")
> heatmap.2(logCPM, col=col.pan, Rowv=TRUE, scale="none",
+           trace="none", dendrogram="both", cexRow=1, cexCol=1.4, density.info="none",
+           magin=c(10,9), lhei=c(2,10), lwid=c(2,6))
Error in .External.graphics(C_layout, num.rows, num.cols, mat, as.integer(num.figures),  : 
  invalid graphics state

What did I miss?

Thank you in advance.

ADD COMMENTlink modified 6 weeks ago by Aaron Lun17k • written 7 weeks ago by mictadlo0
0
gravatar for Aaron Lun
6 weeks ago by
Aaron Lun17k
Cambridge, United Kingdom
Aaron Lun17k wrote:

It's easy to help yourself. A bit of Googling brings up posts like:

... which suggest running dev.off() before attempting to make the plot.

ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by Aaron Lun17k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 140 users visited in the last hour