7346 Rate this article:
No rating

An update to the CURRENT keyword

Mark Alonzo
(Note: I'm out of town this week; this is a short post I banked earlier in the year.) The IDL 8 (a.k.a. New) Graphics CURRENT keyword got a useful update in IDL 8.2.2: instead of being a Boolean, it now accepts a window reference, which allows me to place a plot in a specific window. For example, if I make two empty windows, W1 and W2:
w1 = window(window_title='Window #1')
w2 = window(window_title='Window #2')
and I want to ensure that a new plot goes into the first window, W1, I can set the CURRENT keyword like so:
p = plot(/test, current=w1, title='I''d like this to be in Window #1')
Check! Prior to IDL 8.2.2, the SetCurrent method would also do the trick, but I think this syntax is nicer.

Please login or register to post comments.