For the lazy programmer who wants to add a simple diagonal reference line passing through (0, 0) with slope=1, the following simple code will work too:

Given you have computed xMin, xMax, yMin and yMax as shown by Rick, compute:

min = min (xMin, yMin);
max= max (xMax, yMax);

Write these to the data set and merge it with the original data set. Then replace the vector statement in Rick's code with this one:

vector x=max y=max / xorigin=min yorigin=min noarrowheads;

The MIN= and MAX= settings on the XAXIS and YAXIS statement ensures only the relevant portion of the line is shown.