# Automatically to add some points for a plot

Say I want to plot this

Plot[x,Sin[x],{x,0,4 Pi}]


And I want it to show 4 nicely spaced points, on the line. Is there an automatic way to do this?

I was reading this, but it's not in Mathematica forum and I can't comment because I dont have enough reputation. One of the answer is this

{plot, {points}} = Reap @ Plot[Last@Sow@{x, Sin[x]}, {x, 0, 4 Pi}]


This look like the closest thing to it, but I got this, as a return:

Probably my mistake, but should the point {x,Sin[x]} be part of the points? I am running MMA10.0.1 X64 on windows 7 SP1.

How do I use the points obtained there, to add onto the original plot? Is there a more efficient way?

Thanks!

Plot[Sin[x], {x, 0, 4 Pi}, Mesh -> 4 , MeshStyle -> {PointSize[Large]}]

• Mesh works like a magic! – Chen Stats Yu Oct 19 '14 at 22:42