wiki:rp_xml_ele_unirect2d

<unirect2d>

A unirect2d object defines a uniform rectangular (regular) grid in two dimensions. The grid represents the points in 2D space associated with the values of a field object. This type of object is typically used with contour or surface plots.

Note: This format is deprecated. Use the <grid> subelement in the <mesh>.

<unirect2d id="mygrid">
  <hide>yes</hide>
  <about>
    <label>2D Rectangular Uniform Mesh</label>
  </about>
  <xaxis>
    <label>X Axis Label</label>
    <min>1.0</min>
    <max>100.0</max>
    <numpoints>10</numpoints>
    <units>um</units>
  </xaxis>
  <yaxis>
    <label>Y Axis Label</label>
    <min>-1.0</min>
    <max>1.0</max>
    <numpoints>500</numpoints>
    <units>um</units>
  </yaxis>
</unirect2d>

Note that we set hide tag to yes. This ensures Rappture does not try to visualize the unirect2d object. Unirect2d objects are containers to describe uniform rectangular grids for field objects. The unirect2d object is only useful when accompanying a field. Currently there is no way to visualize a unirect2d object alone.

Each unirect2d object must have both an xaxis and yaxis element, representing the X and Y dimensions. It must contain sub-elements defining the minimum and maximum points in the dimension, along with the number of points.

The axis sub-elements are as follows:

<xaxis><label>
is the text displayed along the x-axis.
<xaxis><min>
is the minimum x-coordinate.
<xaxis><max>
is the maximum x-coordinate.
<xaxis><numpoints>
is the number of uniformly spaced points on the x-axis.
<yaxis><label>
is the text displayed along the y-axis.
<yaxis><min>
is the minimum y-coordinate.
<yaxis><max>
is the maximum y-coordinate.
<yaxis><numpoints>
is the number of uniformly spaced points on the y-axis.

The unirect2d is used by the field object.

<field id="f2d">
  <about>
    <label>2D Field</label>
  </about>
  <component>
    <mesh>output.unirect2d(mygrid)</mesh>
    <values>0
0
0
0
...
    </values>
  </component>
</field>

You can see working code in the zoo of examples in the unirect2d example or on the hub in the directory /apps/rappture/examples/zoo/unirect2d.

Last modified 11 years ago Last modified on Jun 15, 2013 12:24:10 AM