Number Line Plot

Description

The Number Line Plot question type requires students to plot points on a line, or stack points above a line.

Figure 1 - Number Line Plot question example.


The video tutorial below shows how to author a Number Line Plot question.



Create a Question

Enter the question stem into the Compose question area. Below you will see the Line section where you can configure basic number line parameters.

Add Minimum and Maximum values of the number line. You can also enter the number line title. The title will be displayed underneath the number line unless otherwise specified (see Layout).

Set a value for the Number of responses allowed. This determines the number of elements the user can add to the number line. For instance, if the task is to plot three inequalities the number of responses allowed will be 3.

Figure 2 - Line section settings.


Now configure validation for your question. Follow these steps to set up score and correct response:

  • Insert value in the Point(s) box to set up a mark for the question.
  • In the Correct tab you will see the number line you just created. In order to validate the question simply plot correct responses on the number line. See example in Figure 3.
  • Figure 3 - Question validation.

  • Number Line Plot questions are scored by Exact Match, Partial Match per Response and Partial Match.

More Options

Under the More Options section you can change formatting settings, scoring types and apply different styles to your question.


Scoring Types

Scoring type menu can be found under More Options

The following scoring types are available in the Number Line Plot question types:

  • Exact Match - Student must answer all parts of the question correct to receive a mark.
  • Partial Match Per Response - Each correct response element will be awarded an individual score.
  • Partial Match - Each correct response element will be scored individually and the overall question score will be divided between responses.

Figure 4 - Number Line Plot question scoring types

Layout

In this section various styling an be applied to the question. The Layout drop down menu allows authors to decide between horizontal and vertical plotting. You can also add custom Width in pixels. This will set the width of the drawn area.

Line margin (px) defines the distance between the number line extremes and the borders of the drawn area. This should also be given in pixels.

Spacing between stacked responses (px) defines the distance between responses when they are stacked above the number line. The value must be given in pixels.

The Stack responses toggle allows to switch from plotting answers to stacking them above the number line.

Show min arrow and Show max arrow allow to hide or show arrows in the minimum and maximum values of the number line.

Figure 5 - Number line layout settings.


Ticks

This section provides options to configure ticks on the number line.

Show ticks controls the visibility of ticks on the number line.

Rendering base should be defined in case label frequency is greater than 1. This option will determine if labels will render from Zero or Line Minimum Value.

Insert a value in the Distance field - you can insert whole numbers, standard or decimal fractions, or mixed numbers.
You can also specify the value of Minor ticks - minor ticks will be displayed between major ticks.

Show min and Show max toggles control the visibility of the min and max ticks on the number line.

Figure 6 - Number line ticks settings.


Labels

Show labels - enable this to show labels on the number line.

Enable Show min and Show max if you want the labels to be drawn on the min and max values of the number line.

You can also add specific points that should be labeled. For this, insert one or more values in the Points field. In case you have more than one value separate them by commas.


Toolbar

Here you can add or remove buttons that are available for students in the question toolbar. Click on "+Add" below the section title and select the tool from the drop down menu. This will display the tool button in the question toolbar. Click on the bin icon to remove the tool.

Figure 7 - Adding tools to the number line.


The list of the available tools is shown in Figure 7.

Figure 8 - Number line tools.

Example 1 - Number Line Plot question with horizontal layout and 10px margin.

Source
{
    "is_math": true,
    "line": {
        "left_arrow": true,
        "max": 5,
        "min": -5,
        "right_arrow": true
    },
    "stimulus": "Mark -1 to \\(1\\frac{1}{2}\\)",
    "ticks": {
        "distance": 1,
        "show": true,
        "show_max": true,
        "show_min": true
    },
    "stacked": false,
    "instant_feedback": true,
    "type": "numberlineplot",
    "ui_style": {
        "layout": "horizontal",
        "number_line_margin": "10px"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "type": "segment",
                    "point1": "-1",
                    "point2": "1.5"
                }
            ]
        }
    }
}


Example 2 - Number Line Stacked question.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "line": {
        "left_arrow": true,
        "max": 5,
        "min": -5,
        "right_arrow": true
    },
    "stacked_elements": 3,
    "stimulus": "<p><strong>Represent the following point and inequalities on the number line<\/strong><\/p><p>\\(x=\\left(2-5\\right)\\)<\/p>\n\n<p>\\(x\\ge3\\)<\/p><p>\\(-1 &lt; x\\le2\\)<\/p>",
    "ticks": {
        "distance": 1,
        "minor_ticks": 0,
        "show": true,
        "show_max": true,
        "show_min": true
    },
    "type": "numberlineplot",
    "ui_style": {
        "layout": "horizontal",
        "number_line_margin": "2px"
    },
    "validation": {
        "alt_responses": [
            {
                "score": 0.5,
                "value": []
            },
            {
                "score": 0.5,
                "value": []
            },
            {
                "score": 0.5,
                "value": []
            },
            {
                "score": 0.5,
                "value": []
            }
        ],
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "type": "point",
                    "point1": -3
                },
                {
                    "type": "ray_right_direction",
                    "point1": 3
                },
                {
                    "type": "segment_left_point_hollow",
                    "point1": -1,
                    "point2": 2
                }
            ]
        }
    }
}

Example 3 - Vertical Number Line.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "line": {
        "left_arrow": true,
        "max": 10,
        "min": -10,
        "right_arrow": true
    },
    "stacked": false,
    "stacked_elements": 3,
    "stimulus": "<p><strong>Represent the following point on the number line<\/strong><\/p><p>\\(x\\ge4\\)<\/p>",
    "ticks": {
        "base": "zero-based",
        "distance": 2,
        "minor_ticks": 1,
        "show": true,
        "show_max": true,
        "show_min": true
    },
    "type": "numberlineplot",
    "ui_style": {
        "layout": "vertical"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "type": "ray_right_direction",
                    "point1": "4"
                }
            ]
        }
    }
}


Example 4 - Number Line Plot question with configured toolbar.

Source
{
    "instant_feedback": true,
    "line": {
        "max": 10,
        "min": -10
    },
    "stimulus": "Plot a right ray including 1",
    "ticks": {
        "distance": 1,
        "show": true
    },
    "stacked": false,
    "toolbar": [
        "ray_right_direction_left_hollow",
        "ray_left_direction_right_hollow",
        "ray_right_direction",
        "ray_left_direction"
    ],
    "type": "numberlineplot",
    "ui_style": {
        "layout": "horizontal"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "type": "ray_right_direction",
                    "point1": "1"
                }
            ]
        }
    }
}


Example 5 - Number Line Stacked question with 1 response.

Source
{
    "instant_feedback": true,
    "line": {
        "left_arrow": true,
        "max": 5,
        "min": -5,
        "right_arrow": true
    },
    "stimulus": "<p>On the number line below show all positive numbers using the segment tool.</p>",
    "ticks": {
        "base": "zero-based",
        "distance": 1,
        "minor_ticks": 0,
        "show": true,
        "show_max": true,
        "show_min": true
    },
    "title": "Positive numbers",
    "toolbar": [
        "segment"
    ],
    "type": "numberlineplot",
    "ui_style": {
        "layout": "horizontal",
        "width": "400px"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "type": "segment",
                    "point1": "1",
                    "point2": "5"
                }
            ]
        }
    }
}