3 Customizing Plots
The plot/extend module allows you to create your own constructors, further customize the appearance of the plot windows, and in general extend the package.
(sample-size sample-count x-min x-max) → real? |
sample-count : exact-positive-integer? |
x-min : number |
x-max : number |
Given sample-count, x-min, and x-max, returns the size of each sample.
| |||||||||||||||||||||
x-sample-size : real? | |||||||||||||||||||||
y-sample-size : real? |
Scales vectors, causing them to fit in their boxes.
sample-count : exact-positive-integer? |
x-min : number |
x-max : number |
Given samples, x-min, and x-max, returns a list of xs spread across the range.
| |||||||||||||||||||||
vec : vector? | |||||||||||||||||||||
x-sample-size : real? | |||||||||||||||||||||
y-sample-size : real? |
Normalizes vec based on x-sample-size and y-sample-size.
| |||||||||||||||||||||
x-sample-size : real? | |||||||||||||||||||||
y-sample-size : real? |
Normalizes vecs based on x-sample-size and y-sample-size.
(make-column x ys) → (listof (vector/c real? real?)) |
x : real? |
Given an x and a list of ys, produces a list of points pairing the x with each of the ys.
(xy-list sample-count x-min x-max y-min y-max) |
sample-count : exact-positive-integer? |
x-min : real? |
x-max : real? |
y-min : real? |
y-max : real? |
Makes a list of all the positions on the graph.
Given a function that consumes x and y to produce z, a list of xs, and a list of ys, produces a list of z column values.
superclass: object% |
Returns the minimum plottable x coordinate.
Returns the minimum plottable y coordinate.
Returns the maximum plottable x coordinate.
Returns the maximum plottable y coordinate.
(send a-plot-view set-line-color color) → void?
color : plot-color?
Sets the drawing color.
(send a-plot-view set-line-width width) → void?
width : real?
Sets the drawing line width.
superclass: plot-view% |
Provides an interface to drawing 2-D plots. An instance of 2d-view% is created by plot, and the following methods can be used to adjust it.
(send a-2d-view set-labels
x-label
y-label
title)
→
x-label : string?
y-label : string?
title : string?
Sets the axis labels and title.
(send a-2d-view plot-vector head tail) → void?
Plots a single vector.
(send a-2d-view plot-vectors vecs) → void?
vecs
:
Plots a set of vectors.
(send a-2d-view plot-points points sym) → void?
sym : (one-of/c 'square 'circle 'odot 'bullet)
Plots points using a specified symbol.
Plots a line given a set of points.
(send a-2d-view plot-contours
grid
xs
ys
levels)
→
Plots a grid representing a 3-D function using contours to distinguish levels.
(send a-2d-view plot-shades
grid
xs
ys
levels)
→
Plots a grid representing a 3-D function using shades to show levels.
superclass: plot-view% |
Provides an interface to drawing 3-D plots. An instance of 3d-view% is created by plot3d, and the following methods can be used to adjust it.
(send a-3d-view plot-surface xs ys zs) → void?
Plots a grid representing a 3d function in a 3d box, showing only the top of the surface.
Plots a line in 3-D space.
Returns the minimum plottable z coordinate.
Returns the maximum plottable z coordinate.
Returns the altitude (in degrees) from which the 3-D box is viewed.
Returns the azimuthal angle.