DOCUMENT(); loadMacros( 'PGstandard.pl', 'MathObjects.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl' ); $x = non_zero_random(-10, 10); $gt = GraphTool("{point, ($x, 0)}")->with( availableTools => ['PointTool'], JSXGraphOptions => JSON->new->encode({ boundingBox => [ -12, 0.5, 12, -0.5 ], defaultAxes => { x => { ticks => { label => { offset => [ 0, -6 ], anchorY => 'top', anchorX => 'middle' }, drawZero => 1, minorTicks => 1, strokeWidth => 2, majorHeight => 10 } }, }, grid => 0 }), showCoordinateHints => 0, xAxisLabel => '', yAxisLabel => '' ); $ans_name = $gt->ANS_NAME; HEADER_TEXT(MODES(TeX => '', HTML => < .graphtool-container #${ans_name}_graphbox_graph.graphtool-graph { width: 400px; height: 60px; } .graphtool-answer-container #${ans_name}_student_ans_graphbox_graph.graphtool-graph, .graphtool-answer-container #${ans_name}_correct_ans_graphbox_graph.graphtool-graph { width: 200px; height: 50px; } END_STYLE BEGIN_PGML Graph [`[$x]`] on the number line. [_]{$gt} END_PGML ENDDOCUMENT();