StarLogo Vocabulary: Plotting Commands


= used for the observer,
= used for turtles,
= used for patches


_____________________________________________________________
clearplot, cp

Clears everything drawn by all plot pens, and resets all pens.
_____________________________________________________________
plot
y-value

Plots a point at y-value, then increments the x-value of the plot pen. The pen does
nothing if it is already located at the right edge of the graph.
_____________________________________________________________
plot-point
x-value y-value

Plots a point at (x-value, y-value). plot-point is useful for creating
state-space plots.
_____________________________________________________________
plot-xmin

plot-xmax
plot-ymin
plot-ymax

Report the minimum and maximum values of the axes on the plot. These values can be set with
the commands setplot-xrange and setplot-yrange.
_____________________________________________________________
plot-pen1, pp1

Also: pp2, plot-pen2, ..., pp6, plot-pen6

Selects plot pen number 1. Subsequent plotting commands are executed by plot pen 1.

Similarly, the commands pp2 through pp6 select the other plot pens.
_____________________________________________________________
plot-pencolor, ppc

Reports the color of the plot pen. See section 3 for discussion of StarLogo colors.
_____________________________________________________________
plot-pendown, ppd

Puts down the plot pen, so that it draws connected graphs.
_____________________________________________________________
ppinterval

Reports the x-interval distance that the plot pen moves after a plot command. You
can make the plot pen move less than a pixel, or jump many pixels.
_____________________________________________________________
plot-penup, ppu

Lifts up the plot pen, so that it plots points individually (not connected).
_____________________________________________________________
plot-penreset, ppreset

Clears everything plot pen has drawn and resets its x-coordinate to 0.
_____________________________________________________________
ppxcor

Reports the x-coordinate of the plot pen.
_____________________________________________________________
ppycor

Reports the y-coordinate of the plot pen.
_____________________________________________________________
setplot-pencolor, setppc
color

Sets the color of the plot pen to color. See section 3 for discussion of StarLogo
colors.
_____________________________________________________________
setppinterval
number

Tells the plot pen to move number distance in the x-direction after each plot
command.
_____________________________________________________________
setplot-xrange
min max
setplot-yrange min max

Sets the minimum and maximum values of the axes of the plot.
_____________________________________________________________
setplot-xlabel
title
setplot-ylabel title

Sets title as the label along the axes of the plot.
setup-movie file-name
Sets up for StarLogo to create a new movie called file-name. The movie is created
in PICS format.

Example:
setup-movie "ants
(Sets up a movie called ants.)
========================================================================