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.
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
clearall (ca) (clear-all)
Description:
Kills all turtles, sets all patches to black, and resets all variables to 0.
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
plot-grid-off
Description:
Turns the plot grid off.
Related Commands:
plot-grid-on
plot-grid?
plot-grid-on
Description:
Turns the plot grid on.
Related Commands:
plot-grid-off
plot-grid?
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
plot-title
Description:
Returns the title of the plot
Related Commands:
setplot-title
plot-xlabel
Description:
Returns the value of the label of the x-axis of the graph.
Related Commands:
plot-ylabel
setplot-xlabel
plot-xmax
Description:
Returns the current maximum x-value of the plot.
Related Commands:
plot-xmin
plot-ymax
setplot-xmax
setplot-xrange
plot-xmin
Description:
Returns the current minimum x-value of the plot.
Related Commands:
plot-xmax
plot-ymin
setplot-xmin
setplot-xrange
plot-ylabel
Description:
Returns the value of the label of the y-axis of the graph.
Related Commands:
plot-xlabel
setplot-ylabel
plot-ymax
Description:
Returns the current maximum y-value of the plot.
Related Commands:
plot-xmax
plot-ymin
setplot-ymax
setplot-yrange
plot-ymin
Description:
Returns the current minimum y-value of the plot.
Related Commands:
plot-xmin
plot-ymax
setplot-ymin
setplot-yrange
plotid
number
Parameters:
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
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
pp
number
Parameters:
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
ppc
Description:
Returns the current plot pen color.
Related Commands:
pp
ppd
ppreset
ppu
ppxcor
ppycor
setppc
ppd
Description:
Puts the plot pen down, so that it draws connected graphs.
Related Commands:
pp
ppc
ppd
ppreset
ppu
ppxcor
ppycor
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
ppu
Description:
Lifts up the plot pen, so that it plots points individually (not connected).
Related Commands:
pp
ppc
ppd
ppreset
ppxcor
ppycor
ppxcor
Description:
Returns the x-value of the current plot pen.
Related Commands:
pp
ppc
ppd
ppreset
ppu
ppycor
ppycor
Description:
Returns the y-value of the current plot pen.
Related Commands:
pp
ppc
ppd
ppreset
ppu
ppxcor
set-count-plot-pens
number
Parameters:
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
setplot-bar-width
width
Parameters:
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.
setplot-title
name
Parameters:
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
setplot-xlabel
label
Parameters:
Description:
Sets the label of the x-axis of the graph to label.
Related Commands:
plot-xlabel
setplot-ylabel
setplot-xmax
value
Parameters:
Description:
Sets the maximum value of the x-axis to be value.
Related Commands:
plot-xmax
setplot-xmin
setplot-xrange
setplot-xmin
value
Parameters:
Description:
Sets the minimum value of the x-axis to be value.
Related Commands:
plot-xmin
setplot-xmax
setplot-xrange
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
setplot-ylabel
label
Parameters:
Description:
Sets the label of the y-axis of the graph to label.
Related Commands:
plot-ylabel
setplot-xlabel
setplot-ymax
value
Parameters:
Description:
Sets the maximum value of the y-axis to be value.
Related Commands:
plot-ymax
setplot-ymin
setplot-yrange
setplot-ymin
value
Parameters:
Description:
Sets the minimum value of the y-axis to be value.
Related Commands:
plot-ymin
setplot-ymax
setplot-yrange
setplot-yrange
min max
Parameters:
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
setppc
color
Parameters:
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
view-plot
Description:
Opens the plot window for the currently selected plot.
Related Commands:
plot
plotid