ContactDownloadsThesisForumCV

Main Menu
Home
Ph.D. Pursuit
Materials
EM Topics
F A Q
All Else

 Subscribe in a reader

Enter your email address:

Delivered by FeedBurner


Recommendations

Life as a Physicist

Ars Technica

Macenstein

strawberry hedgehog vegan bath products


Advertisements

July's Recommended Post: Diary of a Graduate Thesis Experiment

Nicer Contours in IDL with iContour
Thursday, 25 October 2007

Details

With conmake it is easy to generate a contour in IDL and control its appearance. One problem with this is that the contour is drawn using IDL's direct graphics and the font display is generally unclear and unattractive. With conmakeOBJ the iContour routine is used to produce output that can be saved in a full vector format. The basic workings of conmake (e.g., selecting the color scale and limiting the data range) pare down the data and then use iContour to produce a clear visualization.

Why conmakeOBJ?

The problem with iContour is that it does not do well when given too much data. If a complete data set is passed to iContour and then one tries to restrict the displayed ranges, for instance, the color scales are not always optimally adjusted. By using conmakeOBJ to select and adjust the data set before invoking iContour, a much better display is generated. I use conmakeOBJ to generate an iContour window and then the features of iContour itself provide for complete adjustment before exporting an image file.

It is also faster to call conmakeOBJ from the command line and let it set up the contour display with a colorbar and axes, among other settings. This reduces the number of manual changes the user must make before generating output.

Examples

The examples below are the result of making an exported image file after running conmakeOBJ. So far, the overplotting mechanism is not in place, but axis choices, axis labels, and isotropic scales are included. The routine brings up an iContour window, so after running conmakeOBJ everything is controlled through the common iContour interface and conmakeOBJ is not used. Using the provided source code it should be possible to adapt to any specific needs you may have. There is a very helpful tech tip for manipulating iContour from either the command line or a .pro routine on IDL's website here.

The following examples are the result of the shown command line input after iContour is used to generate an image file. These are .jpg in order to keep filesize small, but iContour lets you make vector output or many other image formats. In the examples “data” is a two-dimensional array. Additional help with the keywords and syntax of conmakeOBJ can be found within the conmake description.

conmakeobj, data, 20
conmakeOBJ basic display
The extra whitespace is part of the default appearance. Within iContour it is possible to scale the graphic and make it fill the window.

 

conmakeobj, data, 20, /cbar
conmakeOBJ with colorbar
The default colorbar location is shown. Within iContour it is a simple procedure to click and drag the colorbar to any desired location.

 

conmakeobj, data, 20, /cbar, /iso, xran=[5,40], yran=[15,25]
advanced comakeOBJ display
The default display from conmakeOBJ has been adjusted within iContour. The colorbar is moved and given an outline and larger characters. An x-axis label and above contour annotation is added. Since the iso keyword was used there has been no rescaling of the contour, but the exported figure was cropped to remove whitespace.

Tags: , , ,

Last Updated ( Friday, 15 February 2008 )
 
< Prev   Next >

 

© 2000-2008 David Pace
Design by David Pace