OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 

9.2 Customizing Graph Layer Elements


The Plot Details dialog box layer-level tabs provide controls for layer color, layer size, data clipping, hiding graph elements, scaling of elements when the layer is resized, and the skipping of data points. While the graph window contains only a single page, it can contain multiple graph layers, and each layer may be configured independently using these layer-level controls.

The layer-level controls of 2D graph

Customizing Graph Layer Elements-1.png

The layer-level controls of 3D graph

Customizing Graph Layer Elements-5.png

The layer icon and the active graph layer

Each layer in the graph window is numbered and is denoted by a small, gray icon in the upper-left corner of the graph page. These layer icons provide a visual cue as to the number of graph layers in the window and as to which graph layer is active layer. They are not printed or exported with the graph. The display of the layer icon can, in fact, be toggled on or off with a menu command (View: Show: Layer Icons).

As mentioned, one important function of the layer icon is to provide a visual cue as to the active layer. A graph page may have multiple layers, but only one layer in that page is active at any given time. The active graph layer is indicated by a depressed layer n icon (the icon is "flat" and the numeral is black). In this figure, layer 2 is the active layer.

The Graph Layer-1.png

When you customize a multi-layered graph via the user-interface, you necessarily act on the active layer. If the desired layer is not already active, you must activate it before customizing the size or appearance of the layer.

To make a graph layer active, do one of the following:

  • Click (once) on the layer n icon in the upper-left corner of the graph window (see Note below).

or

  • Click on the X, Y, or Z axis (or anywhere inside the layer frame) of layer n.

or

  • Click on an object (data plot, text object, etc.) that is attached to layer n.

or

  • With the ALT key down, click on a plot in layer n.

Note that if the Plot Details dialog box is open, you can select any layer on the page by highlighting the associated layer icon in the left panel of the dialog box. This effectively allows you customize a layer's properties without performing one of the above actions.

The active layer will also be indicated by highlighted graph axes, if the View: Show: Active Layer Indicator menu command is checked. Note that this active layer indicator (see the picture below) is not turned on globally; it must be applied to each graph page.

The Graph Layer-2.png

Displaying a layer background color and adding a border

By default, the layer does not display a background color; it is transparent. Any color that is subsequently applied to the graph page also displays in each layer on the page. The layer border is a bounding box outside of the layer frame. Controls for adding a layer (background) color and a border are found on the Background tab of the layer's Plot Details dialog box.

To add a background color to a layer:

  1. Select the desired color from the Color drop-down list (None = transparent).

To display the layer border:

  1. Select a border from the Border Style drop-down list.

Controlling the size of the graph layer

You can make approximate adjustments to the size of the graph layer by selecting the layer and dragging a control handle.

To move or resize the layer:

  1. Click on the border to select it. Control handles display.
  2. Move or resize the border in the same way as you would other objects.
Customizing Graph Layer Elements-2.png

To make more precise adjustments, you can edit the layer dimensions using controls on the Size/Speed tab of the layer's Plot Details dialog box.

To open the Size/Speed tab of Plot Details:

  1. With the graph window active, select Format: Layer.
  2. Select the Size/Speed tab.

To numerically position or resize the layer, type values in the Left, Top, Width, and Height text boxes. The Left text box value determines the position of the frame relative to the left side of the page. The Top text box value determines the position of the frame relative to the top of the page. The Height and Width text box values determine the size of the frame. Specify the units with the Units drop-down list.

  • Specify inch, cm, mm, pixel or point.
  • The % of Page option is useful for maintaining the same layer size relative to the page size. When this is selected, the Left, Top, Height, and Width text box values are expressed as percentages of the graph page height and width.
  • The % of Linked Layer option is useful for creating inset graphs. This unit allows you to specify the frame dimensions and offsets for a child layer in terms of the dimensions of the parent layer frame. When this unit is selected, the Left, Top, Height, and Width text box values are in percentage of the height and width of the parent layer frame. This option is not available unless the current layer is linked to a parent layer.

Note:

  • When the unit selection is changed in the drop-down list, the Left, Top, Height, and Width text box values are automatically updated so that the layer retains the same size and position.
  • When you set the size of the layer, you are also setting the size of the axes in the layer. To set the layer (and thus the axes) to a specific width and height, select the units (for example, inch, cm, or mm) from the Units drop-down list in the Layer Area group, then enter the dimensions in the Width and Height text boxes.

Increasing screen redraw speed: Graphing image caching and selective plotting of data

  • Graphic image caching lets you use vector or raster buffering to display data plots in a layer, instead of having Origin redraw the data plots each time the graph window is made active, or when a dialog box that was covering the data plots is closed.
  • Speed Mode lets you specify the maximum number of data points that can display for each data plot in a layer. This not only increases redraw speed but it allows you to systematically reduce the number of data points in your plot (which may increase graph legibility). To learn more, see Speed Mode in the User Guide.

Speed mode and graphic image caching controls are on the Size/Speed tab of the layer's Plot Details dialog box.

Scaling elements

There are a number of graph elements that may be resized when you resize the graph layer. These include axis tick labels, label objects such as the graph legend and possibly added graph annotations (text and drawing objects). Since you may or may not want this to happen, there is a Plot Details setting that provides control over element scaling.

Use of the layer's Scale Elements controls are covered in the following topics in the Origin Help file:

Showing and hiding elements

The Plot Details Display tab contains controls for showing or hiding various graph elements. To learn more see Hiding elements in the graph layer in the Origin Help file.

Data plot drawing options

The Display tab of Plot Details also has controls for:

  • Drawing data plots and symbols on top of the layer axes.
  • Drawing axis grid lines on top of data plots and symbols.

To learn more, see Controlling the Display and Scaling of the Objects in a Layer in the Origin Help file.

Data and objects clipping and layer margins

Data clipping and layer margins

Data plots that extend beyond the layer frame, or beyond the customized clipping margins, can be hidden from view.

For 2D Graphs

To clip the data plot in the active graph layer:

  1. Select Format: Layer. This opens the Plot Details dialog box with the layer icon selected on the left side of the dialog box.
  2. Select the Display tab and then select the Clip Data To Frame check box in the Data Drawing Options group. To view the clipped data, clear this check box.

To set the clipping margins inside or outside the layer frame:

  1. Type the margin value percentages in the Horizontal and Vertical text boxes in the Data Drawing Options group.
  2. Type a negative value to clip the data plot to a point outside the frame.
  3. Type a positive value to clip the data plot to a point inside the frame.

For 3D Graphs

To clip 3D OpenGL plots and control the margins:

  1. Select Format: Layer. This opens the Plot Details dialog box with the layer icon selected on the left side of the dialog box.
  2. Go to the Miscellaneous tab and check Enable under Clipping
  3. Control the margin by entering % From and % To values for X, Y and Z respectively.

Object clipping

When you add a text or drawing object to an Origin graph, it becomes part of the graph layer that was active at the time of object creation. This is true even if the object is created outside the layer frame (in which case, it might be attached to the graph page; see Object Attachment and Scaling for more information).

By default, such objects are not clipped to the layer frame. This allows you to place objects outside the layer frame and have them remain visible. However, you may encounter situations where you do not want an object to display outside the layer frame.

Clip object problem.png

You can fix such problems by setting a stray object's clip property to 1.

ObjectName.clip=1; // object follows Plot Details Clip Data to Frame property of the containing layer.

This forces object clipping to follow the Clip Data to Frame property of the containing layer; if Clip Data is turned on for the layer, any contained object for which the clip property is set to 1, will be hidden if it lies outside the layer frame. Note that this property must be set for each object, individually.

Clip object problem2.png


For information on associating graphic objects with LabTalk script, or on the ObjectName.clip property, see Graphic Objects.

Rotate the 3D graph

For 3D graph, you can enter length and angle value to rotate the graph.

To rotate the 3D surface, you can

  1. Select Frame: Layer Properties to open the Plot Details dialog.
  2. Go to Axis tab, enter 50 in the X length box, and then enter 200 in the Azimuth box.
  3. Set the Perspective Angle(0-30) as 20.

Move and adjust the planes

In 3D graph layers, you can control the position and display of the XY, YZ, and ZX planes.

To move the XY plane to the middle of Z axis,

  1. Select Frame: Layer Properties to open the Plot Details dialog.
  2. Go to the Planes tab. In this tab, set XY Position as %From Bottom and enter 50 in the following Percent/Value box.
  3. Set the color of XY plane as green and transparency as 40.

Control the light source

In the 3D graph layer, you can control the lighting of 3D plots, including the light position and light colors.

To add lighting on the 3D surface, you can

  1. Select Frame: Layer Properties to open the Plot Details dialog.
  2. Go to Lighting tab, select Directional to add directional light on the surface.
  3. Adjust the direction and light color to show the surface with lighting.
This section covers the following topics:
 

© OriginLab Corporation. All rights reserved.