PLOT

BASin

PLOT

Statement/Command

PLOT is used in high-resolution graphics to plot a pixel or dot of colour at a particular position on the screen.

How to use PLOT

PLOT is used to form a statement in a program or as a direct command. It is normally followed by two numeric values separated by a comma, for example

50 PLOT 128,87

Both values following PLOT are rounded to integers if necessary. The first value may then range from 0 to 255 and defines the horizontal coordinate of a position on the screen. The second value may range from 0 to 175 and defines a vertical coordinate. A pixel is then normally plotted in the current ink colour at the defined position - in the above example at the centre of the screen.

Note the following effects of colour statements or commands on PLOT. After OVER 1, an existing dot at the same position is changed to the paper colour. Following INVERSE 1, the dot is plotted in the current paper colour. After BRIGHT 1 or FLASH 1, the whole character position on the low-resolution screen in which the pixel is plotted will be bright or flashing.

These four keywords and INK or PAPER may also be embedded (inserted) within a PLOT statement in the same way as with PRINT, for example

160 PLOT INK 2;x,y

Their effect is the same but is then local and limited to statement. If colour statements are embedded this way then the character position on the low-resolution screen which is occupied by the point plotted will be affected by the colour changes and assume the given values.

Note that PLOT also defines the starting position of the next DRAW statement.

Format

  • PLOT [statement;] int-num-expr,int-num-expr

See also

Chapter 17.