Previous ION Java User's Guide: Using ION's Pre-Built Applets Next

IONContourApplet

The IONContourApplet displays an IDL contour plot. The X, Y and Z values of the plot and any IDL Contour properties supported by ION can be set through parameters to the applet.


Note
You can also create contour plots using the IONGraphicApplet, specifying the contour properties in IDL command strings. The IONContourApplet is merely a simplified way to display contour plots.

Parameters

In addition to the parameters described in Parameters Specified via <PARAM> Tags, the IONContourApplet accepts the following parameters:

X_VALUES

Set the value of this parameter equal to a valid IDL expression that evaluates to a vector or two-dimensional array specifying the X coordinates for the contour surface. If X_VALUES specifies a vector, each element specifies the X coordinate for a column in the Z_VALUES array(e.g., X[0] specifies the X coordinate for Z[0,*]). If X_VALUES specifies a two-dimensional array, each element specifies the X coordinate of the corresponding point in the Z_VALUES array.

Y_VALUES

Set the value of this parameter equal to a valid IDL expression that evaluates to a vector or two-dimensional array specifying the Y coordinates for the contour surface. If Y_VALUES specifies a vector, each element specifies the Y coordinate for a column in the Z_VALUES array(e.g., Y[0] specifies the Y coordinate for Z[0,*]). If Y_VALUES specifies a two-dimensional array, each element specifies the Y coordinate of the corresponding point in the Z_VALUES array.

Z_VALUES

Set the value of this parameter equal to a valid IDL expression that evaluates to a one- or two-dimensional array containing the values that make up the contour surface. If the X_VALUES and Y_VALUES parameters are provided, the contour is plotted as a function of the (X, Y) locations specified by their contents. Otherwise, the contour is generated as a function of the two-dimensional array index of each element of Z_VALUES.

contour_property_1, ..., contour_property_n

Here, contour_property_* is the name of a contour property supported by the IONGrContour class. Properties for the IONContourApplet reflect the capabilities implemented in keywords to the IDL CONTOUR procedure.

The syntax above refers to the fact that you can supply more than one contour property to the applet via the <PARAM> tag. In the example in the next section, TITLE is a contour property with the value of "Contour."

The following IDL Contour properties are supported by IONContourApplet. Refer to the IDL documentation on keywords available for use with the CONTOUR procedure for an explanation of each property:

C_ANNOTATION, C_CHARSIZE, C_COLORS, C_LABELS, C_LINESTYLE, C_ORIENTATION, C_SPACING, CLOSED, DOWNHILL, FILL, CELL_FILL, FOLLOW, IRREGULAR, LEVELS, NLEVELS, OVERPLOT, BACKGROUND, CHARSIZE, CLIP, COLOR, DATA, DEVICE, FONT, LINESTYLE, NOCLIP, NODATA, NOERASE, NORMAL, POSITION, SUBTITLE, T3D, TICKLEN, TITLE, MAX_VALUE, MIN_VALUE, NSUM, POLAR, XLOG, YNOZERO, YLOG, XCHARSIZE, YCHARSIZE, ZCHARSIZE, XGRIDSTYLE, YGRIDSTYLE, ZGRIDSTYLE, XMARGIN, YMARGIN, ZMARGIN, XMINOR, YMINOR, ZMINOR, XRANGE, YRANGE, ZRANGE, XSTYLE, YSTYLE, ZSTYLE, XTICKFORMAT, YTICKFORMAT, ZTICKFORMAT, XTICKLEN, YTICKLEN, ZTICKLEN, XTICKNAME, YTICKNAME, ZTICKNAME, XTICKS, YTICKS, ZTICKS, XTICKV, YTICKV, ZTICKV, XTITLE, YTITLE, ZTITLE, ZVALUE, ZAXIS

Example

The following example creates an IONContourApplet that connects to the same server used by the "Connection" applet defined in the IONGraphicApplet example. The applet generates some data for the Z value of the contour, and sets the "Title" property of the contour plot.

<APPLET NAME="CONTOUR" CODE=IONContourApplet.class  
    WIDTH=200 HEIGHT=200  
    ARCHIVE="ion_64.zip"  
    CODEBASE=../classes>  
    <!-- This applet uses the applet 'CONNECTION' to connect  
        to the server -->   
    <PARAM NAME="ION_CONNECTION_NAME" VALUE="CONNECTION">     
    <PARAM NAME="Z_VALUES" VALUE="exp(-(shift(dist(30), 15,  
        15)/7)^2)">     
    <PARAM NAME="TITLE" VALUE="Contour">     
</APPLET>   

Note that the example uses an IDL expression to generate the Z values for the contour. The Z values could also have been specified as an IDL array, with a statement like:

    <PARAM NAME="Z_VALUES"   
        VALUE="[[1,2,3,4][2,3,4,5][3,4,5,6][4,5,6,7]]">  

  IDL Online Help (March 06, 2007)