next up previous contents
Next: Labelling your graphs Up: Graphs Previous: Adding functions to your   Contents

Displaying your graphs

The usual way in which you would display a graph is via the statements:

BEGIN_TEXT

Below is the graph of a function \( f \): 
($BBOLD Click on image for a larger view $EBOLD) 
$PAR
\{ image(insertGraph($graph_object)) \}
$PAR

END_TEXT

There are two functions which are called here: image and insertGraph. Often they are used together as above, but occasionally they are invoked separately.

For example, the actual ``value'' of $graph_object is something like WWPlot=HASH(0x879f278). The actual graph image (more precisely, the full path to the image) is provided by insertGraph($graph_object). That is, it returns a path like
.../webwork_tmp/course_XYZ/gif/trs-82786-setShemanskeprob2gif1.gif The image macro generates the appropriate code for insertion of a graphic into an HTML or LATEX document.

We should also note that graphs can be labeled and captioned. The distinction here is that labels appear as a part of the graph object, while captions are separate from the object.



Thomas R. Shemanske 2002-03-05