From mathieu.ribatet at math.univ-montp2.fr  Thu Nov 24 09:54:36 2011
From: mathieu.ribatet at math.univ-montp2.fr (Mathieu Ribatet)
Date: Thu, 24 Nov 2011 09:54:36 +0100
Subject: [Rd] Changing graphic titles when using bquote and resizing the
	graphic window
Message-ID: <4A8ABA2F-933A-495A-9990-E4258965838A@math.univ-montp2.fr>

Dear list,

I found a strange behavior of the graphic display when using bquote to set a title to a plot. The problem arise when you manually resize the graphic window using the mouse. It happens on both quartz and x11 devices. Here's a reproducible example:

par(mfrow = c(1,3))
for (i in 1:3){
  title <- as.expression(bquote(gamma[.(i)]))
  plot(1:10, main = title)
}

Once you ran the code, the figure displays as expected --- each title is $\gamma_i$, $i=1, 2, 3$. Now if you resize manually the graphic window using the mouse all the titles will be set to $\gamma_3$.

In case this is useful, here's the ouput of sessionInfo().

> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

Best,
Mathieu

----------------------------------------------------------------- 
I3M, UMR CNRS 5149
Universite Montpellier II,
4 place Eugene Bataillon
34095 Montpellier cedex 5   France
http://www.math.univ-montp2.fr/~ribatet
Tel: + 33 (0)4 67 14 41 98



[Rd] Changing graphic titles when using bquote and resizing the graphic window
Mathieu Ribatet