Ethan Merritt - 2025-06-07

You raise a good point.

As I understand it, the SVG units are dimensionless. The physical size of the plot you see is determined by the document in which the svg figure is embedded. For instance in an HTML web page the figure is embedded by a command like this:

        <div>
        <embed src="simple.svg" type="image/svg+xml" width=500 height=400 />
        </div>

So the on-screen size reserved for the plot will be 500 pixels by 400 pixels regardless of what range of coordinates the svg file uses internally. Suppose you created a plot by requesting set term svg size 1000,700 and then embedded it in a web page using the commands above. When you view the web page in a browser, the browser will scale the svg figure to fit the reserved space. In this example the svg x coordinates, which run from 0-1000, will be scaled to fill a width of 500 pixels. I.e. a scale factor of 50%. If this same scaling is applied to the y coordinates then the svg y coordinate range 0-700 would be mapped onto 350 vertical pixels in the displayed page; i.e. less than the 400 pixels that were reserved for it. I do not know if there is some standard that specifies what is supposed to happen in case of a mismatch like this. In practice I see extra whitespace above and/or below the plot, which retains its 5:4 aspect ratio. But it could be that other browsers or viewing programs would distort the original aspect ratio to fill the reserved space.

Short version: You can think of svg terminal "size" units as arbitrary integer units whose magnitude sets a limit on the precision of the coordinates used to describe the lines and points being plotted. Setting size 1000,700 gives you 10 times the precision as size 100,70. But the physical size you see on a page or on a screen is determined elsewhere.