I can't reproduce your error in R 2.14.1 on an OSX 10.6.8 box.
However, your example doesn't start with a graphics device specification.
Did you start the graphics device with x11() before your first plot()
command?
If by "R on a terminal" you mean in Terminal.app, then you
wouldn't
normally get an X11() window:
> plot( c(.1,.3,.4), ylim=c(0,1))
> dev.list()
quartz
2
Did you start R, for example, in an xterm shell within an X windows
context?
If so, you could try starting the graphics device with x11(type='Xlib')
to see if it behaves better.
Finally, why are you using MacPorts? The binary download for CRAN should
work fine.
You should ask your question on r-sig-mac, although you might not get much
support for problems with the MacPorts version of R. I don't know.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 2/1/12 2:14 PM, "Yasir Suhail" <yusuhail at gmail.com> wrote:
>I installed R 2.14.1 on a OSX 10.7.2 computer using MacPorts. If I fire up
>R on a terminal, this very simple session gives me errors. I attach
>sessionInfo() details as well. In addition to the warnings, I also do not
>get any plots on the X11 window after the warnings. So one cannot just
>ignore the warnings since the plots don't work anymore after this. I
guess
>one could try to avoid this by not overwriting the plots, but it should
>not
>lead to errors fatal to the X11 graphics output of the R session. Is this
>reproducible on other machines and is this a bug?
>
>Thanks!
>
>> plot(c(.1,.3,.4),ylim=c(0,1))
>> dev.off()
>null device
> 1
>> plot(c(.1,.3,.4),ylim=c(0,1))
>> plot(c(.1,.3,.4),ylim=c(0,1))
>> dev.off()
>null device
> 1
>> plot(c(.1,.3,.4),ylim=c(0,1))
>Warning messages:
>1: In dev.flush() :
> X11 protocol error: BadRequest (invalid request code or no such
>operation)
>2: In dev.flush() : X11 protocol error: BadGC (invalid GC parameter)
>3: In dev.flush() :
> X11 protocol error: BadRequest (invalid request code or no such
>operation)
>4: In dev.flush() :
> X11 protocol error: BadRequest (invalid request code or no such
>operation)
>> sessionInfo()
>R version 2.14.1 (2011-12-22)
>Platform: x86_64-apple-darwin11.0.0/x86_64 (64-bit)
>
>locale:
>[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/C
>
>attached base packages:
>[1] stats graphics grDevices utils datasets methods base
>Warning message:
>X11 protocol error: BadRequest (invalid request code or no such operation)
>>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.