The Horizontal Line Test can also be used to tell if a function is or isn't onto: if any horizontal line that you draw on top of the graph intersects at least once with the curve, then the function is surjective; otherwise, if you can draw a horizontal line that doesn't intersect at all with the curve, then the function is NOT onto.
This is an onto function! Miriam Briskman, CC BY-NC 4.0
This is NOT an onto function. Miriam Briskman, CC BY-NC 4.0