MATLAB: I would like to randomly draw some points on top of the rectangle that i drew.

labeling points

I drew a rectangle and i want to scatter some points on top of this rectangle. If successful, i need to label these points with horizontal line to the right of the rectangle. if i use plot or scatter command, the points only appeared below the rectangle. How do i make the points to be on the rectangle?
I need help. best

Best Answer

  • Use plot3() or scatter3() and give the points a Z value slightly greater than 0 so that they will be "above" the rectangle.