Section Summary

Action code is added to embedded components in Maple to drive actions in Maple documents. This section, describes the steps needed to write Maple code that creates a point plot with a single point, similar to the following:
>

plots:pointplot([1, 0], tickmarks = [[seq(5 .. 5)], 0],
view = [5 .. 5, 1 .. 1],
symbol = solidcircle,
symbolsize = 25)

In later sections, you will add this code to the Plot component in order to interactively plot a point.



In order to create a number line, you must first learn the syntax for creating a number line plot in Maple.
The plots:pointplot command can create a new empty point plot:
$\mathit{plots}\mathbf{:}\mathit{pointplot}\left(\left[\right]\right)\mathbf{\;}$
${}$
Since you are building a number line, there are a few ways in which you can adjust our plot command in order to hide the yaxis:
axis

tickmarks

The axis option can control the color of the yaxis:
$\mathrm{plots}:\mathrm{pointplot}\left(\left[\right]\,\mathit{axis}\left[\mathbf{2}\right]\mathbf{}\mathbf{equals;}\mathbf{}\left[\mathit{color}\mathbf{equals;}''White''\right]\right)semi;$
${}$

Using 0 as the value for the ytickmarks means that no tickmarks are shown:
$\mathrm{plots}:\mathrm{pointplot}\left(\left[\right]\,\mathit{tickmarks}\mathbf{}\mathbf{equals;}\mathbf{}\left[\left[\mathit{seq}\left(\mathbf{}\mathbf{5}\mathbf{}\mathbf{..}\mathbf{}\mathbf{5}\right)\right]\mathbf{comma;}0\right]\right)semi;$
${}$



The view option is also important for ensuring the the plot looks like a number line:
$\mathrm{plots}:\mathrm{pointplot}\left(\left[\right]\,\mathrm{tickmarks}equals;\left[\left[\mathrm{seq}\left(5..5\right)\right]comma;0\right]comma;\mathit{view}\mathbf{equals;}\left[\mathbf{}\mathbf{5}\mathbf{..}\mathbf{5}\mathbf{comma;}\mathbf{}\mathbf{1}\mathbf{..}\mathbf{1}\right]\mathbf{comma;}\mathrm{size}equals;\left[500comma;100\right]\right)semi;$
Note in the above, you use the size option for making the yaxis shorter. The size option will not be needed later in this page as the size of the plot is dictated by the size of the Plot component.
Now that you have a suitable number line, adding a point to the number line is as simple as adding a value to our original code:
$\mathrm{plots}:\mathrm{pointplot}\left(\left[\mathbf{1}\mathbf{\,}\mathbf{0}\right]\,\mathrm{tickmarks}equals;\left[\left[\mathrm{seq}\left(5..5\right)\right]comma;0\right]comma;\mathrm{view}equals;\left[5..5comma;1..1\right]comma;\mathrm{size}equals;\left[500comma;100\right]\right)semi;$
The size of the point in the above is rather small. The point size and style are controlled by the symbol and symbolsize options:
$\mathrm{plots}:\mathrm{pointplot}\left(\left[1\,0\right]\,\mathrm{tickmarks}equals;\left[\left[\mathrm{seq}\left(5..5\right)\right]comma;0\right]comma;\mathrm{view}equals;\left[5..5comma;1..1\right]comma;\mathrm{size}equals;\left[500comma;100\right]comma;\mathrm{symbol}equals;\mathrm{solidcircle}comma;\mathrm{symbolsize}equals;25\right)semi;$
With this, you now have the required Maple code in order to create a point plot of a single value on a number line.