Command List

Here are a list of commands that affect plotting. Note you may also use the plotting wizard to create plots, but you may not use these commands on wizard created plots.

Observer

clear-plot (clearplot)

Description:
Clears everything drawn by all plot pens in the current plot window, and resets all pens to (0, 0) and their original colors.

Related Commands:
clearplots plot
Observer

clearall (ca) (clear-all)

Description:
Kills all turtles, sets all patches to black, and resets all variables to 0.

Turtle, Observer, Patch

count-plot-pens

Description:
Reports the number of plot pens in the current plot window. Use plotid to set the current plot window.

Related Commands:
set-count-plot-pens
Turtle, Observer, Patch

plot-grid-off

Description:
Turns the plot grid off.

Related Commands:
plot-grid-on plot-grid?
Turtle, Observer, Patch

plot-grid-on

Description:
Turns the plot grid on.

Related Commands:
plot-grid-off plot-grid?
Turtle, Observer, Patch

plot-grid?

Description:
Returns a boolean. If the plot grid is on, true is returned. If the plot grid is off, false is returned.

Examples:
show plot-grid? will return false if the plot grid is not on.

Related Commands:
plot-grid-off plot-grid-on
Turtle, Observer, Patch

plot-title

Description:
Returns the title of the plot

Related Commands:
setplot-title
Turtle, Observer, Patch

plot-xlabel

Description:
Returns the value of the label of the x-axis of the graph.

Related Commands:
plot-ylabel setplot-xlabel
Turtle, Observer, Patch

plot-xmax

Description:
Returns the current maximum x-value of the plot.

Related Commands:
plot-xmin plot-ymax setplot-xmax setplot-xrange
Turtle, Observer, Patch

plot-xmin

Description:
Returns the current minimum x-value of the plot.

Related Commands:
plot-xmax plot-ymin setplot-xmin setplot-xrange
Turtle, Observer, Patch

plot-ylabel

Description:
Returns the value of the label of the y-axis of the graph.

Related Commands:
plot-xlabel setplot-ylabel
Turtle, Observer, Patch

plot-ymax

Description:
Returns the current maximum y-value of the plot.

Related Commands:
plot-xmax plot-ymin setplot-ymax setplot-yrange
Turtle, Observer, Patch

plot-ymin

Description:
Returns the current minimum y-value of the plot.

Related Commands:
plot-xmin plot-ymax setplot-ymin setplot-yrange
Turtle, Observer, Patch

plotid number

Parameters:
number Number

Description:
Sets the current plot to number, where number is the id number of an existing plot. Plot procedures now operate on this current plot.

Examples:
plotid 2 sets the current plot to plot number 2

Notes:
This command does not change the name of the plot, it just changes which of the plots is currently being addressed.

Related Commands:
plot pp view-plot
Turtle, Observer, Patch

plotxy x-value y-value

Parameters:
x-value Number
y-value Number

Description:
Plots a point at the location (x-value, y-value). This procedure is used for X-Y plots and scatterplots.

Examples:
plotxy 1 1 plots a point at the coordinate (1,1).

Related Commands:
plot
Turtle, Observer, Patch

pp number

Parameters:
number Integer

Description:
Selects the plot pen specified by number. Subsequent plotting commands are executed by the selected plot pen. There are ten plot pens, numbered 1 through 10. The space between pp and integer is optional.

Examples:
pp 1 selects the first plot pen

Related Commands:
plot plotid ppc ppd ppreset ppu ppxcor ppycor setppc
Turtle, Observer, Patch

ppc

Description:
Returns the current plot pen color.

Related Commands:
pp ppd ppreset ppu ppxcor ppycor setppc
Turtle, Observer, Patch

ppd

Description:
Puts the plot pen down, so that it draws connected graphs.

Related Commands:
pp ppc ppd ppreset ppu ppxcor ppycor
Turtle, Observer, Patch

ppreset

Description:
Clears everything that the currently selected plot pen has drawn and resets it position to (0,0).

Related Commands:
plot pp ppc ppd ppreset ppu ppxcor ppycor
Turtle, Observer, Patch

ppu

Description:
Lifts up the plot pen, so that it plots points individually (not connected).

Related Commands:
pp ppc ppd ppreset ppxcor ppycor
Turtle, Observer, Patch

ppxcor

Description:
Returns the x-value of the current plot pen.

Related Commands:
pp ppc ppd ppreset ppu ppycor
Turtle, Observer, Patch

ppycor

Description:
Returns the y-value of the current plot pen.

Related Commands:
pp ppc ppd ppreset ppu ppxcor
Observer

set-count-plot-pens number

Parameters:
number Number

Description:
Sets the number of plot pens to number.

Examples:
set-count-plot-pens 2 sets the number of plot pens to 2.

Related Commands:
count-plot-pens
Turtle, Observer, Patch

setplot-bar-width width

Parameters:
width Number

Description:
Sets the width of the bars in the histogram plot to width.

Examples:
set-bar-width 2 sets the width of the bars in the historgram to 2.

Notes:
For use only with the histogram plot.


Turtle, Observer, Patch

setplot-title name

Parameters:
name String

Description:
Sets the title of the plot to name.

Examples:
setplot-title "fire" sets the title of the current plot to the name "fire".

Related Commands:
plot-title
Turtle, Observer, Patch

setplot-xlabel label

Parameters:
label String

Description:
Sets the label of the x-axis of the graph to label.

Related Commands:
plot-xlabel setplot-ylabel
Turtle, Observer, Patch

setplot-xmax value

Parameters:
value Number

Description:
Sets the maximum value of the x-axis to be value.

Related Commands:
plot-xmax setplot-xmin setplot-xrange
Turtle, Observer, Patch

setplot-xmin value

Parameters:
value Number

Description:
Sets the minimum value of the x-axis to be value.

Related Commands:
plot-xmin setplot-xmax setplot-xrange
Turtle, Observer, Patch

setplot-xrange min max

Parameters:
min Number the minimum value of the x-axis
max Number the maximum value of the x-axis

Description:
Sets the minimum value of the x-axis to be min and the maximum value of the x-axis to be max.

Related Commands:
plot-xmax plot-xmin setplot-xmax setplot-xmin
Turtle, Observer, Patch

setplot-ylabel label

Parameters:
label String

Description:
Sets the label of the y-axis of the graph to label.

Related Commands:
plot-ylabel setplot-xlabel
Turtle, Observer, Patch

setplot-ymax value

Parameters:
value Number

Description:
Sets the maximum value of the y-axis to be value.

Related Commands:
plot-ymax setplot-ymin setplot-yrange
Turtle, Observer, Patch

setplot-ymin value

Parameters:
value Number

Description:
Sets the minimum value of the y-axis to be value.

Related Commands:
plot-ymin setplot-ymax setplot-yrange
Turtle, Observer, Patch

setplot-yrange min max

Parameters:
min Number
max Number

Description:
Sets the minimum value of the y-axis to be min and the maximum value of the y-axis to be max.

Related Commands:
plot-ymax plot-ymin setplot-ymax setplot-ymin
Turtle, Observer, Patch

setppc color

Parameters:
color Color

Description:
Sets the color of the current plot pen to be color.

Examples:
setppc black sets the current plot pen to black.

Related Commands:
pp ppc
Turtle, Observer, Patch

view-plot

Description:
Opens the plot window for the currently selected plot.

Related Commands:
plot plotid