When I give plot some bad paramaters, it keeps giving me error messages forever after. I think the last time this happened, I even got the error messages for completely unrelated, non-graphical functions. Here's a recent example:> plot(it[[31]][,c(1, 3)], type="b", usr=c(0, 20, -20, 5))Warning messages: 1: parameter "usr" couldn't be set in high-level plot() function 2: parameter "usr" couldn't be set in high-level plot() function 3: parameter "usr" couldn't be set in high-level plot() function 4: parameter "usr" couldn't be set in high-level plot() function 5: parameter "usr" couldn't be set in high-level plot() function 6: parameter "usr" couldn't be set in high-level plot() function> plot(it[[31]][,c(1, 3)], type="b", ylim=c(-20, 5))Warning messages: 1: parameter "usr" couldn't be set in high-level plot() function 2: parameter "usr" couldn't be set in high-level plot() function 3: parameter "usr" couldn't be set in high-level plot() function 4: parameter "usr" couldn't be set in high-level plot() function 5: parameter "usr" couldn't be set in high-level plot() function 6.... Is this a bug, or have I missed something? R 1.7.1 -- Ross Boylan wk: (415) 502-4031 530 Parnassus Avenue (Library) rm 115-4 ross at biostat.ucsf.edu Dept of Epidemiology and Biostatistics fax: (415) 476-9856 University of California, San Francisco San Francisco, CA 94143-0840 hm: (415) 550-1062
On Thu, 2 Oct 2003, Ross Boylan wrote:> When I give plot some bad paramaters, it keeps giving me error messages > forever after. I think the last time this happened, I even got the > error messages for completely unrelated, non-graphical functions.<snip>> Is this a bug, or have I missed something? > R 1.7.1It's to do with redrawing. When the graphics device is redrawn on the screen (eg if it is covered up and then exposed) the commands that created it are replayed. (in fact, I think they may be replayed twice on some systems). It's not entirely a bug, since the redrawing is necessary: we don't keep a bitmap, and even if we did we'd have to redraw on resize. Suppressing warnings on the redraw would make sense, though. After you do a new plot the warnings should stop resurfacing. -thomas
On Thu, 2003-10-02 at 16:54, Toby.Patterson at csiro.au wrote:> Try > > rm(last.warning) > > -----Original Message----- > From: Ross Boylan [mailto:ross at biostat.ucsf.edu] > Sent: Friday, 3 October 2003 9:10 AM > To: r-help > Subject: [R] Plot can't forget bad parameters > > > When I give plot some bad paramaters, it keeps giving me error messages > forever after. I think the last time this happened, I even got the > error messages for completely unrelated, non-graphical functions. > > Here's a recent example: > > plot(it[[31]][,c(1, 3)], type="b", usr=c(0, 20, -20, 5)) > Warning messages: > 1: parameter "usr" couldn't be set in high-level plot() function > 2: parameter "usr" couldn't be set in high-level plot() function > 3: parameter "usr" couldn't be set in high-level plot() function > 4: parameter "usr" couldn't be set in high-level plot() function > 5: parameter "usr" couldn't be set in high-level plot() function > 6: parameter "usr" couldn't be set in high-level plot() function > > plot(it[[31]][,c(1, 3)], type="b", ylim=c(-20, 5)) > Warning messages: > 1: parameter "usr" couldn't be set in high-level plot() function > 2: parameter "usr" couldn't be set in high-level plot() function > 3: parameter "usr" couldn't be set in high-level plot() function > 4: parameter "usr" couldn't be set in high-level plot() function > 5: parameter "usr" couldn't be set in high-level plot() function > 6.... > > Is this a bug, or have I missed something? > R 1.7.1Well, that's very odd. I did the rm(), and it printed out the warnings again. Then I repeated the two commands above--only this time, there were no warnings after the second (i.e., things worked OK).