On this page:
graph-fun
graph-line

1.13 Graphing Functions: "graphing.rkt"

 (require htdp/graphing) package: htdp-lib

The teachpack provides two functions for graphing functions in the regular (upper right) quadrant of the Cartesian plane (between 0 and 10 in both directions):

procedure

(graph-fun f color)  true

  f : (-> number?  number?)
  color : symbol?
Draws the graph of f with the given color.

procedure

(graph-line line color)  true

  line : (-> number? number?)
  color : symbol?
Draws line, a function representing a straight line, with a given color.

For color symbols, see Simple Drawing: "draw.rkt".

In addition, the teachpack re-exports the entire functionality of the drawing library; see Simple Drawing: "draw.rkt" for documentation.