D3 In Absolute units

See D3/SVG with Absolute Units article.

If the screen resolution is set correctly The width of the drawing above should be exactly 1 inch.
SVG Width/Height = XX * 1 inch = XX pixels.
The GREEN square should be 0.5-by-0.5 inches in size.
The BLUE rectangle should be 1-by-0.25 inches in size.

Enter screeen resolution (or choose from the list):

Screen Resolution: