3D Graphs

Surface meshes and other kinds of three-dimensional plots first became possible in Figure Composer 5.0 with the introduction of the graph node's 3D counterpart, the graph3d element. A 3D Cartesian coordinate system XYZ -- and all data sets therein -- are rendered in perspective on the two-dimensional figure canvas. While a number of different backdrop styles are offered, the 3D graph container is typically presented as a rectangular box with the X, Y, and Z axes drawn adjacent to its outer edges. As shown in the example on the right, the three back sides of this box are normally filled, while the three front faces are hidden. Grid lines may be drawn within the backplanes. Rotation and elevation angles let you adjust the orientation of the coordinate system in 3D space to find the optimum view of the data presented.

[Technical note: The perspective projection encapsulated by graph3d governs the rendering of the 3D backdrop -- including all axes, tick marks, and gridlines -- and all 3D data presentation nodes contained in the graph. However, graph3d can also contain generic text labels, text boxes, shapes, images, and line segments as child nodes. These nodes do not have a Z-coordinate; so they can only positioned in a 2D viewport. The 3D graph's 2D viewport is defined by the rectangle that bounds the 2D projection of the 3D box backdrop (excluding axes) onto the figure canvas; as usual, the origin of this viewport is at the bottom-left corner of the rectangle. For best results, it is best to use relative units ("%") to position labels and other generic graphic objects with respect to their 3D graph parent.]

Like the graph element, graph3d can be thought of as a single composite graphic object with 10 required component nodes. Three axis nodes define the graph's X/Y/Z axes, three back3d elements control the appearance of the XY, XZ, and YZ backplanes, three gridline elements specify the stroking style for the X/Y/Z gridlines, and a legend node specifies the location and layout of the auto-generated legend. These individual components are not accessible from the Figure Navigator's node tree. Instead, all of the properties of the 3D graph and its component parts are displayed and edited in the 3D Graph Properties editor. As you can see in the screenshots on this page, separate tabs on the editor panel are dedicated to the graph backdrop (backplanes and gridlines), the three axes, and the automated legend.

The Main tab exposes properties that set the location of the 3D graph within its parent figure, its physical dimensions in 3D space, and other factors that define the perspective projection of that 3D space onto the figure canvas:

The Color Map combo box selects the color map assigned to the 3D graph (for a 2D graph, the color map is a property of the graph's special "color axis"). As in the 2D context, it is used to map Z-coordinate data to a range of RGB colors. Currently, FC supports 10 different color maps -- go here for a complete description (but note that, unlike the color map for a 2D graph, there's no "NaN color" in the 3D graph's color lookup table).

The text field at the top of the Main tab shows the graph's title. This is only for labeling purposes -- notice that the Figure Navigator displays the title in the graph's entry in the node tree. The title string is NOT rendered anywhere on the graph. If you want to place a title somewhere on the graph, add a label or textbox object to it (or the parent figure).

Note the field labeled "ID (optional)" just underneath the title field. If it is a non-empty string, this "graphic object ID" serves to uniquely identify the 3D graph. Like the title, the ID is never rendered in any way. It is really intended for use outside of Figure Composer -- it provides a way to programmatically locate a particular label, text box or graph within an existing FypML figure, so that you can modify the content of the label or text box, replace the graph with a different one, and so on. If you have no need for the object ID, simply leave it blank.

The 3D graph's backdrop comes in one of five possible styles, as selected by the combo box at the top of the Backdrop tab page:

The other widgets on the Backdrop tab control the appearance of the XY/XZ/YZ backplanes and the X/Y/Z gridlines. There are separate controls for each backplane and each set of gridlines, so you have a lot of flexibility in designing your 3D backdrop. You can hide any backplane by setting both its fill and stroke colors to transparent; you can hide a gridline set by setting its stroke color to transparent or its stroke width to zero.

The remaining tabs in the 3D Graph Properties editor govern the three axes, their associated tick marks, and the automated legend. The Legend tab is identical to its 2D counterpart. The screenshot on the right shows the X-axis tab; the Y- and Z-axis tabs are identical, and they are all very similar to the X and Y tabs in the 2D Graph Properties editor. There are a few significant differences, however:

Backdrop Tab on 3D Graph Properties Editor