How can I draw straight lines?

I can only straw straight lines in ImageJ if the lines are completely horizontal or vertical, while holding down the shift key. At any other angle the line is jagged. How can I draw straight lines between two points that don’t share the same x or y coordinates?

Lines are defined by their endpoints and are AFAIK truly “straight” as represented in the software – that is, if you want to calculate values along a line, or something like that. Profile plots can use sub-pixel resolution.

But on the screen, lines are necessarily represented as a series of square pixels.

If you are looking to annotate your image with a smooth, vector-graphics line (like you would get in PowerPoint or Illustrator), you could try the Scientifig plugin, which saves in SVG format.

Hope this helps.

2 Likes