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:
- Copy the script below, or download the attached BAS file: RemoveAxisTicks.BAS
- In a Windows Explorer window, navigate to C:\Program Files\Golden Software\Surfer.
- Double click on Scripter.exe to launch Scripter.
- Press Ctrl+A to select all of the existing lines then press Delete.
- Press Ctrl+V to paste the script into Scripter.
- 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 End Sub
Updated November 2021
How do I access just the left axis?
Nevermind, I figured it out. For those who are interested,
Set Axes = MapFrame.Axes
Set LeftAxis = Axes(3)
Great, I'm glad you were able to get that working. Let us know if you have any further questions.
Please sign in to leave a comment.