Hard Copy; Default Setting; A Sample Graphics Program - Agilent Technologies 4294A Programming Manual

Precision impedance analyzer
Hide thumbs Also See for 4294A:
Table of Contents

Advertisement

Hard copy

You can produce hard copy output of graphics by use of the printing feature. Press the
START
key located under the

Default setting

The default setting when the power is turned on is as follows.
MOVE 0,0

A sample graphics program

Here follows a simple example to draw a line on the graphics screen.
Drawing a straight line
The program below draws a straight line from the point (50, 200) to another (300, 200).
GCLEAR
! Initializes the graphics screen.
MOVE 50,200
! Moves the pen to the point (50, 200).
DRAW 300,200
! Draws a straight line to the point (300, 200).
END
Drawing a circle
Here follows an example of sub-program for drawing a circle. Giving coordinates of the
center and a radius to this sub-programs as arguments allows you to draw a circle.
Changing the start value and the end value of the parameter Theta in this sub-program
allows you to draw a circular arc too.
SUB Drawcircle(Centx,Centy,R)
DEG
X=Centx+R
Y=Centy
MOVE X,Y
For Theta=1 to 360
X=INT(COS(Theta)*R+Centx)
point on the circle
Y=INT(SIN(Theta)*R+Centy)
point on the circle.
DRAW X,Y
NEXT Theta
SUBEND
Chapter 11
[Copy]
key.
!
! Uses "°" has the unit of agnle.
!
!
! Moves the pen to the start point.
!
! Calculates the x coordinate of a
! Calculates the y coordinate of a
! Draws a line to the point (X, Y)
!
!
Using HP Instrument BASIC
Displaying Graphics
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents