Follow

How can I remove the tick marks from the axes in Surfer via automation?

Set the MajorTickType and/or MinorTickType to srfTickNone to not have the tick marks shown on the axis. Below is a full script demonstrating the use of this option.

 

To run this script:

  1. Copy the script below.
  2. In a Windows Explorer window, navigate to C:\Program Files\Golden Software\Surfer 15\Scripter.
  3. Double click on Scripter.exe to launch Scripter.
  4. Press Ctrl+A to select all of the existing lines then press Delete.
  5. Press Ctrl+V to paste the script into Scripter. 
  6. Click Script | Run to run the script.
     

*********

Sub Main

    Dim SurferApp, Plot, MapFrame, Axes, Axis As Object
    Set SurferApp = CreateObject("Surfer.Application")
    SurferApp.Visible = True

    Infile = SurferApp.Path + "\samples\demogrid.grd"
    Set Plot = SurferApp.Documents.Add
    Set MapFrame = Plot.Shapes.AddContourMap(GridFileName:=Infile)
    Set Axes = MapFrame.Axes

    For Each Axis In Axes
        Axis.ShowLabels = False
        Axis.MajorTickType = srfTickNone
        Axis.MinorTickType = srfTickNone
    Next Axis

End

  

Updated October 9, 2017

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.