2
$\begingroup$

I figure the answer to this may be really simple. Why does

ListPlot[MapThread[Labeled[ #1,#2,Left] &,{{1,5,-4,2}, {"pt1", "pt2", "pt3", "pt4"}}]]

plot and label the points, but

NumberLinePlot[MapThread[Labeled[ #1,#2,Left] &,{{1,5,-4,2}, {"pt1", "pt2", "pt3", "pt4"}}]]

doesn't label the points but still plots? If NumberLinePlot is incompatible with Labeled, is there a way around this to still properly put labels on the graphics output?

$\endgroup$
2
  • $\begingroup$ That is incorrect syntax for NumberLinePlot. The documentation does not say that NumberLinePlot can take data in wrappers. $\endgroup$
    – Edmund
    Commented Mar 14, 2017 at 2:03
  • $\begingroup$ possible duplicate: Labeling points in NumberLinePlot $\endgroup$
    – kglr
    Commented Mar 14, 2017 at 2:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.