Transform Compass Direction to Angle (Degrees) In Grapher

To plot a wind plot in Grapher, the wind direction must be an angle in degrees. If your wind direction is listed in your data file as a compass direction, like N, SE, or WNW, you will need to create a new data column for angle in degrees. This can be done in Grapher's worksheet.

  1. Click File | Open, select your data file, and click Open.
  2. Click Data Tools | Data | Transform.
  3. In the Transform dialog,
    1. In the Transform equation box, enter this equation, substituting out your column containing the directions where you see "A", and the new column you want the angle in degrees to be written to for "B".
    2. Change the First row to 2 if you have a header row.
    3. Set the Text cells list to Are treated as text.
    4. Click OK.
  4. If you also have values like NNE and ESE, repeat step 3, but use this equation this time:
    B=If(A="NNE",22.5,IF(A="NNW",337.5,IF(A="ENE",67.5,IF(A="WNW",292.5,IF(A="SSE",157.5,IF(A="SSW",202.5,IF(A="ESE",112.5, IF(A="WSW",247.5,B))))))))


To display the axes labels as compass directions, see here: Display Compass Direction instead of Degrees on a Polar Plot in Grapher.


Updated May 2023

Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.