# Graph a Function with WAPlot

Plot a simple non-asymptotic function using Mathematica®. This type of Mathematica graph is primarily used to plot lines, curves, and basic functions with or without asymptotes.
1. Click Questions > Create.
The Question Editor opens.
2. In Name, type a name for the question.
3. In Mode, select one of the question modes to define the basic behaviors for your question.
4. In Question, type your question.

Use the answer placeholder string <_> to specify where the answer box should be displayed.

6. Add WAPlot tags to the question, answer, or solution field of a question.
If a WAPlot image is used in the answer field, the question mode must be multiple-choice, and there cannot be linebreaks in the WAPlot code. WAPlot images cannot be placed in assignment descriptions.
<waplot type='MathematicaSyntax'> </waplot>
7. Insert the Mathematica code for your function inside the WAPlot tags.
<waplot type='MathematicaSyntax'>
Plot[
x/2 - 1,
{x, -10,10},
PlotRange->{{-10,10}, {-10,10}},
AxesLabel->{x, y},
AspectRatio->1,
PlotStyle->Directive[Blue, Thick]
]
</waplot>
Do not include "y =" before your expression. All expressions are assumed to be of the form "y =" and adding this will cause the solution to your function to be displayed as the y-axis label.
8. In the <waplot> tag, use the @alt attribute to add alternative text describing the image for students using screen readers.
<waplot type='MathematicaSyntax' alt='graph with slope 1/2 and y intercept -1'>
Make sure the content of the alternative text is appropriate to the pedagogy of your question.

## Graphing a Function

The following table summarizes an actual question.

 QID 3969548 Template2 6.WAPLOT.01. Multiple-Choice  Is the graph below a direct variation? <_> Yes No ## Graphing a Randomized Function

The following table summarizes an actual question.

 QID 3969543 Template2 6.WAPLOT.02. Multiple-Choice  # $m represents the denominator for the slope$m = randnum(2,5,1); # (-$b) represents the y-intercept$b = randnum(1,5,1); '' Is the graph below a direct variation? <_> Yes No 