It's important to distinguish between pixels and points. A square set of points belongs to one pixel. When users type `linewidth=3`, they usually mean a line 3 pixels wide. The distance between the pixel center points, then, is 2.