Fanning Software Consulting

Erase Method Not Erasing

Facebook Twitter RSS Google+

QUESTION: I find that when I re-run a script that creates a (function graphics) plot it always creates a new window, which steals the focus (and pops up the new window in the wrong place). This drives me crazy. It would be much better if I could erase the old one and reuse the same window. Then my window layout would stay put and focus would stay in the editing window. I read that an Erase method was to be available in IDL 8.2, but I don't see any evidence of it. Will it be available soon?

ANSWER: Whoops! Yes, it did get added in IDL 8.2, but it has remained undocumented since then and it, well, doesn't actually erase the graphics window on UNIX machines, including the Mac, although it does make it possible to draw into it repeatedly with another function graphics command.

The way it should work is like this.

   IDL> p = Plot(Findgen(11))
   IDL> p.erase
   IDL> p = Plot(Reverse(Findgen(11)), /Curent)

The erase problem is scheduled to be fixed soon.

Version of IDL used to prepare this article: IDL 8.2.3.

Written: 13 May 2014