|Contour Plotting Routine for IDL|
An object oriented version of this routine, one that uses iContour, is now available as conmakeOBJ.
A routine for making contour plots in IDL is now available for download. IDL is a program used for the processing and visualization of data. If you do not use IDL, then this code will not be useful. If you use IDL but do not know a lot about it, then this code should be helpful because the source is significantly commented. If you have any questions or suggestions please feel free to contact me through any of the methods listed in FAQ - Sending Comments.
This routine works by generating a contour plot in the active graphics window. The best way to make images from the plot is to use the following command immediately after running conmake:
IDL> WRITE_PNG, 'desired_path/your_filename.png', TVRD( /TRUE )
where WRITE_PNG is a native IDL module and IDL> is the command prompt.
The minimum command line usage of this procedure is,
IDL> conmake, input, #
where input is a two dimensional array and # is the number of colors to use in the plot. Read the header of the source code for detailed notes on other parameter and keyword options.
The following images display some of the output that I have used from the conmake routine. These are the actual images produced with WRITE_PNG, and their file sizes are indicative of results you should expect for a similar setup.
Fig. 1: This plot illustrates usage of the axis labels and colorbar. The command to produce this contour is,
IDL> conmake, input, xaxis, yaxis, 256, xlab=2, ylab=2, /cbar
where input (two dimensional array), xaxis (one dimensional array), and yaxis (one dimensional array) were IDL variables.
Fig. 2: This image illustrates use of the axis labels and minimum level settings without a colorbar. The minlev keyword causes all data values below its value to be treated as missing data. The missing data, or noise level values in this case, are ignored. The white regions of the contour represent the absence of data. The command to produce this contour is,
IDL> conmake, input, xaxis, yaxis, 256, xlab=5, ylab=3, minlev=-18
Fig. 3: This image shows the axis labels, colorbar, and overplot settings. The command to produce this contour is,
IDL> conmake, input, xaxis, yaxis, 256, xlab=2, ylab=2, overp=opinput
where opinput is a two dimensional array. The array to be overplotted should have the same scaling with the x and y axes as the main contour so that a sensible output results.
The changelog of the file is provided so that you can more easily determine whether to download a new release.
|Initial Posting: Saturday, 28 January 2006|
|Last Updated: Monday, 03 November 2008|