Script icon

Rename Plots | XFdtd

Recreate the legend without rebuilding the graph.

The Rename Plots macro updates plot legend entries without requiring users to rebuild the entire graph. This functionality mimics the application preference settings that define how default plot legends are created.

Alternatively, users can change the default plot names by clicking Edit in the upper-left corner of XF and selecting Application Preferences to open the editor, then working under the Graphs tab. In order to apply and view these changes, users must then recreate the graph.

The rename plots macro supports any plot created through the results browser. Exceptions include plots that were flattened upon creation, and plots created through scripting that do not link to an underlying result.

Use the rename plots macro by following these steps:

  1. Download RenamePlots.xmacro
  2. Place the file in the Macros Menu directory or right-click on Scripts in the Project Tree and choose Import Scripts.
  3. Select the desired graph in the Project Tree.
  4. Execute the script by selecting it in the Macros Menu, or right-click on the imported script in the Project Tree and choose Execute.

Once the script is executed, a window opens that lists the naming options and available plots. Any unsupported plots appear in the lower portion of the window.

  1. In the Plot Name Information section, select identifiers to rename the plots.
  2. In the Plots to Rename section, select the plot names to revise in the legend.
  3. Click OK.

The script immediately updates the graph legend with the revised plot names.