Points and Lines Drawing Tools

A simple code to implement points and point-to-point lines drawing in a figure.

You are now following this Submission

gpoints is the function for drawing points,
gsortline is the function for drawing lines (lines are drawn by points clicking and connected by smoothing), and
DrawGUI is a demo.

- mouse left click to add a point
- mouse left click on a point and hold to
- movemouse right click on a point to remove
- keyboard input "s" to save the drawing
- keyboard input "r" to reset the drawing to previous saving
keyboard input "Delete" to delete the drawing

Cite As

Marco Chak Yan Yu (2026). Points and Lines Drawing Tools (https://www.mathworks.com/matlabcentral/fileexchange/42429-points-and-lines-drawing-tools), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Interactive Control and Callbacks in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0