Tag Archives: hashes

Determining a library version

(I’ve been out for a week, so today’s post is short. I’ll return shortly to the sunspot number data from last week’s post.) What’s the version number of the GRIB library in the current IDL release? I should probably know … Continue reading

Posted in language, programming | Tagged , , , , , , | Leave a comment

Discrete colorbar in (New) Graphics

The improved NG COLORBAR function in IDL 8.2 makes it much easier to display a discrete colorbar. The  example below is adapted from one of the IDLffVideoWrite examples I created for IDL 8.1; here, I use NCEP/NCAR Reanalysis 1 data … Continue reading

Posted in language, visualization | Tagged , , , , , , | 6 Comments

Using (New) Graphics in an IDL widget program, part II

Last week, I demonstrated how to set up a widget interface that embeds an IDL 8 (aka New) Graphics (NG) window with the WIDGET_WINDOW function. This week, let’s see how event handling works in this program. (Get the full program … Continue reading

Posted in language, programming, visualization | Tagged , , , , , , , | Leave a comment

Using (New) Graphics in an IDL widget program, part I

Here’s an example of embedding an IDL 8 (aka New) Graphics (NG) window in an IDL widget program with the WIDGET_WINDOW function. There’s quite a bit of code + explanation involved, so I’m breaking this example into two posts: I’ll go over … Continue reading

Posted in language, programming, visualization | Tagged , , , , , , , | 5 Comments

Using a hash as a widget state variable

The design pattern of a state variable in (procedural) IDL widget programming is used to communicate information from a widget creation routine to event handlers and other helpers. A state variable is typically implemented as a structure or as a … Continue reading

Posted in language, programming | Tagged , , , | 1 Comment

A technique for flexible Get/SetProperty methods in IDL 8

(Note: This is a guest post by Ron Kneusel, a Senior Consultant in the Exelis VIS Professional Services Group. I frequently bug Ron with questions about computer science, IDL and Linux. –MP) IDL’s new hash table object, along with some … Continue reading

Posted in language, programming | Tagged , , , , , | 2 Comments

Displaying exploded axes with (New) Graphics

While I’m out of the office this week, here’s another hacktastic example for your enjoyment: displaying exploded axes in a (New) Graphics plot. Start by making a plot with axis labels and ticks that point outward, and include some extra … Continue reading

Posted in visualization | Tagged , , , | 2 Comments

Hash syntax for accessing children in (New) Graphics

A useful feature of (New) Graphics (NG) is the ability to access a component of a visualization by name using hash syntax. This behavior is derived from the GetByName method implemented by most container classes in Object Graphics. For example, … Continue reading

Posted in language, visualization | Tagged , , , | 2 Comments