# How to plot one point [closed]

I am trying to plot one point on a graph. I put in Plot[{3, 1}, {x, -2, 5}], but I get a line. How can I put in just one point?

• ListPlot[{{3, 1}}, PlotRange -> {{-2, 5},Automatic}] Commented Jan 9, 2018 at 0:12
• Take a look at Graphics, Point and friends.
– Kuba
Commented Jan 10, 2018 at 9:11

Normally, one does't plot discrete points with Plot, which is mainly intended for more or less continuous functions. But it can be done.

Plot[{}, {x, -2, 5},
PlotRange -> {{-2, 5}, {0, 1.5}},
Epilog -> {AbsolutePointSize[5], Point[{3, 1}]}]


However, ListPlot is the function provided for plotting point data. For your single point you could write it like this:

ListPlot[{{3, 1}}, PlotRange -> {{-2, 5}, {0, 1.5}}]


which gives the same plot as shown above.

Show[Graphics[Point[{3, 1}]], PlotRange -> {{0, 4}, {-2, 5}},
Axes -> Automatic]

• This can be shortened to Graphics[Point[{3, 1}], PlotRange -> {{0, 4}, {-2, 5}}, Axes -> Automatic] Commented Jan 9, 2018 at 2:15