This article contains a sample script for turning the visibility of an axis off.
To run this script:
- Copy the script below, or download the attached BAS file: Visibility of Axis OFF.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.
- If you copied this script, press Ctrl+V to paste it into Scripter. If you downloaded it, click File | Open, select the BAS file from your downloads directory, and click Open.
- Click Script | Run to run the script.
'=========================================== 'Visibility of Axis OFF.bas '=========================================== 'Shows how to turn off the visibility of an axis, like unchecking the check box for 'the axis in the Contents window in the UI. '=========================================== Sub Main 'Initializes Surfer Dim SurferApp, Plot, MapFrame, Axes As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True Set Plot = SurferApp.Documents.Add 'Creates a contour map Set MapFrame = Plot.Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\samples\demogrid.grd") 'Turns off the visibility of the bottom axis MapFrame.Axes("Bottom axis").Visible=False End Sub
Updated November 6, 2018
Comments
0 comments
Please sign in to leave a comment.