HV-3030: Edit Legends

Learn how to edit legend format, colors, and fill color, and save legend settings for future use.

This exercise uses the d3plot model file located in the animation/truck folder as both the model and results file.
To access the Edit Legend dialog:
  • Click the Edit Legend button in the Contour, Vector, or Tensor panel.


Figure 1.

The Edit Legend dialog allows you to change the color band, format, and descriptions for legends.

Edit the Legend Format

  1. Load the d3plot file, located in the animation\truck folder.
  2. Create a vonMises stress contour using the Contour panel .
  3. Click Apply.
  4. Animate the model .
    Observe the changes in the legend.
  5. Click the Animation Controls panel button on the Animation toolbar.
  6. Slow down the speed of the animation by adjusting the Max Frame Rate.
  7. Pause the animation .
  8. Return to the Contour panel.
  9. Click Edit Legend.
  10. Change the legend Type to Dynamic scale.
    The legend values automatically change in the preview window.
  11. Change the legend Position to Lower left and click Apply.
    The legend moves to the new position.
  12. Close the Edit Legend dialog.
  13. Animate the model.
    Observe the legend updates for each time step.
  14. Stop the animation.
  15. Open the Edit Legend dialog.
  16. Experiment with the following:
    • Change the numeric format.
    • The format automatically changes in the legend box.
    • Change the numeric precision.
    • Change the number of levels.
    • The number of color bands in the legend box automatically changes.
    • Click the Reverse button.

    The values are reversed in the legend box. The lowest value is now red; the highest is now blue.

    Figure 2. Original Levels
    Figure 3. Reversed Levels
  17. Change the legend Type to Fixed scale.
  18. Click on a number in the legend box and enter a new value.
  19. Press ENTER.
    The edited value is displayed in bold font. The remaining values linearly interpolate.
  20. Add a header and footer to the legend.
    1. Activate the Header check box and enter text in the text box.
    2. Click the font button and change the font type and size.
    3. Click OK.
    4. Activate the Footer check box and enter text in the text box.
    5. Click the font button and change the font type and size.
    6. Click OK.
    7. Click Apply to add the legend header and footer to the legend on the screen.

Edit Legend Colors

  1. Change the color of a legend band.
    1. Click on a color band.
    2. Select a new color.
    3. Click OK.
    4. Change another color.
  2. Interpolate colors between two color bands.
    1. Click Interpolate.
    2. Click on the first changed color.
    3. Click on a second changed color.
    The colors between the two selected colors are interpolated.
  3. Click Apply.
    The new color scheme is applied to the model.
    Figure 4. Original colors
    Figure 5. Two changed colors
    Figure 6. Interpolated colors

Edit the Legend Fill Color

  1. Change the background color of the legend.
    1. Uncheck the Transparency check box.
    2. Click the Fill color box and select a new color from the palette.
      Note: The Fill color option is disabled if the Transparency option is activated.
    3. Click Apply.
      The background color of the legend in the graphics area changes to the new color.
    4. Change the legend background to another color.
  2. Change the legend fill color back to transparent.
    1. Activate the Transparency check box.
    2. Click Apply.
      Observe how the background color of the legend is now the same color as the graphics background.

Save Legend Settings for Future Use

Once you have completed your legend settings, you can save them for future use. Items that can be saved are listed in the Save options section.

Figure 7.
  1. Activate the check boxes for the attributes you want to save.
  2. Click Save.
  3. Designate a file name and path.
    Files are saved in Tcl format.
  4. Click Save.
  5. Click Default to return to the default settings.
  6. Click Apply.
  7. Click Open to open the saved file and load the previously determined legend settings.
    The contour colors and legend are retrieved just as you saved them.