6
$\begingroup$

Let say I want to draw a point and label it. The command I use to draw points is

Graphics[{Point[{0,0}], Point[{1,1}]}]

This draws the points $(0,0)$ and $(1,1)$. How can I label them in the resulting graphics as $(0,0)$ and $(1,1)$?

$\endgroup$
3
6
$\begingroup$

Here's a somewhat ridiculous way to achieve that:

ListPlot[
 {Labeled[{0, 0}, "The first point"], Labeled[{1, 1}, "The second one", Left]},
 Axes -> False
]

Mathematica graphics

$\endgroup$
9
  • 3
    $\begingroup$ this has the added advantage of using the built-in algorithms for label placement. +1 $\endgroup$
    – rcollyer
    May 21 '16 at 0:51
  • $\begingroup$ @rcollyer that's what I was getting at with my link to (45496) above. $\endgroup$
    – Mr.Wizard
    May 21 '16 at 17:45
  • 1
    $\begingroup$ @Mr.Wizard expecting me to follow every link? Sheesh, you would think I spent all my time surfing the net. :) $\endgroup$
    – rcollyer
    May 21 '16 at 21:05
  • $\begingroup$ @rcollyer lol - no :-) $\endgroup$
    – Mr.Wizard
    May 21 '16 at 21:09
  • $\begingroup$ The code didn't work in Mma10.0.2 $\endgroup$
    – Harry
    Apr 16 '17 at 13:19