Colleagues

I have a lengthy script that calls mtext.  Under most circumstances, a graphics 
device is open and a plot exists, in which case mtext works as expected.  
However, there are some instances where the graphics device is open but no plot 
exists.  When mtext is called, I receive an error message:
        Error in mtext(1) : plot.new has not been called yet 

The solution is to confirm that:
        a.  the device is open:         length(dev.list()) > 0
        b.  whether plot.new has been called.

I need help on the latter - how does one test whether plot.new has been called?

Thanks in advance.

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com

______________________________________________
R-help@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.

Reply via email to