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

Mathieu Ribatet mathieu.ribatet at math.univ-montp2.fr
Thu Nov 24 09:54:36 CET 2011

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)

[1] C

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


I3M, UMR CNRS 5149
Universite Montpellier II,
4 place Eugene Bataillon
34095 Montpellier cedex 5   France
Tel: + 33 (0)4 67 14 41 98

More information about the R-devel mailing list