Finally, graphs can be captioned (with descriptive captions or as part of a multiple choice problem) in the following manner. Suppose that @graphs is an array of four graph objects. We could write:
## Make an array of graph paths corresponding to the graph objects. ## @graph_paths = (); for ($i = 0; $i <= 3; $i++) { $graph_path[$i] = insertGraph($graphs[$i]); } ## Make an array of captions for the graphs @captions = (``Graph 1'', ``Graph 2'', ``Graph 3'', ``Graph 4''); ## To display the graphs in a row with their captions ## The ~~ escapes the @ sign ## TEXT(imageRow(~~@graph_path, ~~@captions));