Friedrich,
The problem lies (I believe) with the aspect ratio. Without a title,
in -spmap- the plot region is is the entire graph: -spmap- will
define -xsize()-, -ysize()-, aspect ratio ysize/xsize,
graphregion(margin(zero), and plotregion(margin(zero) ). When there
are no titles there is no inner graph region so the available graph
area is the plot region. But when a title is specified, the graph
area is still defined by -xsize()- and -ysize()- but the title will be
placed in the inner graph region and compress the plot region. To
maintain the specified aspect ratio with the fixed graph size margins
have to appear.
"Note that the overall size of the graph is not changed by the
aspectratio() option. Thus constraining the aspect ratio will
generally leave some additional space around the plot region in either
the horizontal or vertical dimension. " (from -help aspect_ratio-)
... [snip] ...
If you zero out the aspect ratio then your second graph will not have
margins around the map when titles are used. You could add:
local AR
to line 1404, just before the -graph twoway `GRAPH'...- statement.
I don't know if removing the AR will cause problems with other maps,
but It works for your example.
Scott