HG-1020: Modify Plots

In this tutorial, you will learn how to modify plots.

In this tutorial, you will:
  • Work with the Axes panel
  • Use the Coordinate Info panel and TextView
  • Modify curves
  • Create secondary axis and assign curves to them
The Axes panel can be accessed one of the following ways:
  • Click the Axes icon,
  • From the menu bar, select Annotations > Axes

This panel allows you to add multiple axes to plots. Also, axis attributes such as labels, color, and scaling can be modified.

To access Convert Units tool, right-click on the plot axis and select Convert Units.

The Convert Units tool allows you to convert the current unit of measure of a horizontal or vertical axis to another unit of measure. All curves associated with the axis are scaled accordingly and the axis label is updated to reflect the new unit of measure.

Figure 1.
The Coordinate Info panel can be accessed one of the following ways:
  • Click the Coordinate Info icon,
  • From the menu bar select Curves > Coordinate Info

This panel allows you to retrieve individual point data on any curve in the active window. When a point is selected, its data is displayed in the panel.

To access TextView, use the Select Application menu and click TextView, .

The text editor window allows you to view, edit, and save text files, conduct text searches, change text attributes, and evaluate Templex. With Templex, you can obtain curve data from the plot window and display the results in text format in the text window.

The Modify Curves panel can be accessed in one of the following ways:
  • Click the Modify Curves icon,
  • From the menu bar, select Curves > Modify Curves

The Modify Curves panel enables you to modify curve data pertaining to a plot. Curves can be deleted, trimmed, bridged, or hidden within a specified range and orientation.

The Scales Offset and Axis Assignments panel can be accessed in one of the following ways:
  • Click the Scales Offset and Axis Assignments icon,
  • From the menu bar, select Curves > Scales Offsets and Axis Assignments.

Curve scaling, offsets, and axis assignments can be applied to multiple curves using this panel

Open Session File demo_3.mvw

  1. From the File menu click Open > Session.
  2. From the plotting folder, select the demo_3.mvw file and click Open.

Using the Convert Axis Units Tool to Scale the Y Axis

  1. On page 2, activate window 1.
  2. Right-click on the window’s vertical axis and select Convert Units from the pop-up menu.
    The current selection in the Convert Axis Units dialog defaults to Time. This is because the unit converter did not recognize the Y axis unit.
  3. Make the following selections:
    1. Select Force from the dialog.
    2. Select From: N from the drop-down menu.
    3. Select To: kN from the drop-down menu.
  4. Click OK to apply the change and close the dialog
    The Y axis’ label is changed from Force to Force (kN). Also, the Y axis numbers and the curves’ Y data are scaled by 0.001.
  5. Open the unit converter again for the same Y axis. Force is now selected as the tool recognizes the axis’ unit of measure.
  6. Click Cancel to close the Convert Axis Units dialog.

Change the Y Axis Label for Window 1 to Force (kiloNewtons)

  1. Click the Axes panel icon, .
    The Primary axis is highlighted or active in the Axes list.
  2. Above the Axes list, select Vertical from the drop-down menu.
  3. From the Text tab, change Force (kN) to Force (kiloNewtons) and press Ctrl to apply the change.

Create a Datum Line

  1. Activate window 2 on page 2.
  2. Click the Datum Lines panel icon, .
  3. Click Add.
  4. Verify that the choice under the selection for Datum is Horizontal.
  5. Select the Position tab.
  6. Verify that Axis is set to Primary.
  7. For Position, enter the expression sin(90) +100-cos(0) and press Enter.
  8. Click the Line Attributes tab and select a different color for the line.

Trim the Curves

  1. Activate window 3 on page 2.
  2. Click the Modify Curves icon, .
  3. To the right of the Curves field, press the curves icon, .
    The Select Curves dialog is displayed.
  4. Under p2:Force-2 select w3: XY plot and click OK.
    All curves in window 3 are selected and p2w3c1, p2w3c2, p2w3c3 are displayed in the Curves text field.
  5. Verify the option for Direction is set to Horizontal.
  6. Under Range, specify 0.2 for From and press Enter.
  7. Specify 0.95 for To and press Enter.
  8. Under Action, click Trim to remove the data outside of the specified range for the selected curves.
    Figure 2.

Create a Secondary Y Axis in a Plot Window

  1. Click the Add Page icon, .
  2. Go to the Build Plots panel, .
  3. Open the demo.dat file, located in the plotting folder.
  4. Select the option Layout: Use current plot.
  5. Create a curve for X type: Time, Y type: Force, Y Request: REQ/3 Curve3, and Y Component: X.
  6. Create a second curve in the same plot window for X type: Time, Y type: Displacement, Y Request: REQ/33 Curve33, and Y Component: X.
  7. Go to the Axes panel, .
  8. From the drop-down menu above the Axis list select Vertical.
  9. Click Add to create a secondary vertical axis on the plot window’s right side.
    An axis with the name Y1 is created and its name is highlighted (active) in the Axis list.
  10. In the Axis text field above the Axis list, rename the Y1 axis to disp and press Enter.
  11. On the Text tab, rename the Y1 axis label to Comp x disp and press Enter.
  12. Go to the Scales, Offsets, and Axis Assignments panel, .
  13. Verify the curve REQ/33 Curve 33-X is highlighted.
  14. Under Axis assignments, click on the Y: drop down, select disp and click Apply.
    The secondary vertical axis is assigned to the curve REQ/33 Curve33-x.
  15. Click Fit, , to fit the curve to the plot window.

Use Templex to Obtain Information for Existing xy Curves

  1. Click the Page Layout icon, , and select a two-window layout .
  2. Make the second window active
  3. From the Select Application menu, select TextView .
    Figure 3.
  4. Type the following text in the text editor window:
    Maximum Force is {max(p3w1c1.Y)} Newton
    Maximum Displacement is {max(p3w1c2.Y)} meter
  5. From the toolbar, click the Edit Text button, .
    The Templex statements are evaluated and displayed.

    The text editor window is now in non-edit mode.

    Figure 4.
  6. Click the Edit Text icon again to go back to edit mode.