I am trying to write a problem to graph an interval with the Graphtool number line with endpoints that are not integers. It seems with the minorTicksX option one can see tick marks between integer tick marks, but the Interval's endpoints seems to "lock" onto the closest integer. Is there a setting to let the endpoints attach to endpoints like 1.5?
Thanks -- rac
---------------------------Code-------------------------------------
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"parserGraphTool.pl",
"contextInequalities.pl"
);
##############################################
# Set-up
Context("Inequalities-Only");
#--part a------------------------------
$na1 = 1.5;
$na2 = random(1,4);
$a1 = Inequality("x > $na1");
$a2 = Inequality("x < $na2");
$ans_a = Inequality("$na1 < x < $na2");
$numberLine_a = GraphTool("{interval, ($na1,$na2)}")->with(
availableTools =>
[ 'IntervalTool', 'IncludeExcludePointTool' ],
numberLine => 1,
bBox => [ -8, 8 ],
ticksDistanceX => 1,
minorTicksX => 4,
useBracketEnds => 0
);
#######################################
# Main text
BEGIN_PGML
Write the pair of simple statements as a compound statement and illustrate the answer on a number line.
*Note:* _For [`<`], [`>`], [`\leq`], [`\geq`], [`=`], or [`\neq`]. Enter these as *<*, *>*, *<=*, *>=*, *=*, and *!=*._
[` [$a1], [$a2] `]
Answer: [_]{$ans_a} [_]{$numberLine_a}
END_PGML
ENDDOCUMENT();