Grapher Script: Update Legend With Visible Plots Only

Several users have requested the entries in a legend to update based on the plot visibility in Grapher. While this feature is not currently available in the Grapher interface, tech support engineer Kassi has written a script that will allow you to automatically update all legends in a visible graph to display only the plots that are currently visible. The script will loop through all the graphs in the open Grapher file and then update the legend in all the graphs that are visible. First download and upzip the file and then follow these instructions to use the script:

  1. Open the plot that has the graphs and legends you want to update.
  2. Display the Script Manager by clicking View | Managers | Script Manager.
  3. In the Script Manager click the open folder icon.
  4. In the Open window, select the UpdateLegend.BAS and click Open.
  5. Click the Run button, b2ap3_thumbnail_Run, in the Script Manager to run the script.

Your legend will update to contain only entries from the visible plots.