Note that there are some explanatory texts on larger screens.

plurals
  1. POggplot2 code that works interactively (rkward) crashes under Lyx/pgfSweave - Hints please!
    text
    copied!<p>I encounter the following error in the *.Rnw.log:</p> <pre><code>Error: chunk 3 (label=printgraph) Error in grid.Call.graphics("L_text", as.graphicsAnnot(x$label), x$x, : Metric information not available for this family/device </code></pre> <p>only in Lyx and depending upon the statement </p> <pre><code>+ scale_y_log10(ylim=c(0.025,5)) </code></pre> <p>in the following sample code:</p> <pre><code>&lt;&lt;Code, tidy=T, sanitize=TRUE&gt;&gt;= require(ggplot2) df.qdf=data.frame(T = c(0 ,1,2 ,0 ,1.5,2.5) ,q.500 = c(0.025,2,1 ,0.025, 4,2 ) ,q.025 = 0.5*c(0.025,2,1 ,0.025, 4,2 ) ,q.975 = 1.5*c(0.025,2,1 ,0.025, 4,2 ) ,Occasion = c( 1,1,1 ,2 , 2,2 ) ) theme_set(theme_bw()) Graph=(qplot(T,q.500,data=df.qdf) +geom_smooth(aes(ymin=q.025,ymax=q.975) ,data=df.qdf ,stat='identity' ,fill='blue') +ylab('Response') +xlab('Time [h]') +facet_grid(facet=.~Occasion) ) +scale_y_log10(ylim=c(0.025,5)) @ &lt;&lt;printgraph,echo=FALSE,fig=TRUE,width=10,height=7,sanitize=TRUE&gt;&gt;= print(Graph) @ </code></pre> <p>under</p> <ul> <li>openSUSE 11.2, </li> <li>TeXlive2010, (update all installed as of today),</li> <li>R version 2.12.1 (2010-12-16) svn rev 53855 (x86_64-unknown-linux-gnu) with update.packages() as of today,</li> <li>LyX 1.6.8 (reconfigured after TeXLive update),</li> <li>pgfSweave of 18 December 2010 as configured according to Yihui Xie's script ('http://gitorious.org/yihui/lyx-sweave/blobs/raw/master/lyx-sweave-config.R') (Thank you Yihui!)</li> </ul> <p>The code works ok </p> <ol> <li>when pasted in the R-command window of rkward.</li> <li>in lyx when I comment out the <code>+scale_y_log10(ylim=c(0.025,5))</code></li> </ol> <p>I have tried already </p> <pre><code>sanitize=TRUE options(device = function(...) { .Call("R_GD_nullDevice", PACKAGE = "grDevices") }) </code></pre> <p>and</p> <pre><code>dev.off() </code></pre> <p>(suggested in <a href="http://www.inside-r.org/questions/problems-ggplot-and-pgfsweave" rel="nofollow">http://www.inside-r.org/questions/problems-ggplot-and-pgfsweave</a>)</p> <p>None of this helps. Please!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload