I've been working with proc sgmap to generate some plots that are meant to be included in some printed material, and I'm trying to get rid of the white border around the edge of the plots. The images are being handed off to someone working in our communications department who's using a separate piece of software to format and typeset the printed materials, and I need to provide them with the images at a pre-defined resolution and DPI. I can get the DPI of the overall image working just fine, and can turn off the titles/legends/borders without issue, but I've gotten completely stuck trying to make the whitespace go away. I got as far as experimenting with proc template and defining new styles, but I couldn't figure out how to make any of the pieces take effect. Currently I'm falling back on batch processing the images locally to trim the whitespace, but it would be much easier if I could just generate them without the whitespace in the first place, so I don't have to do some extra work to find how much is getting trimmed off (especially if I need to change the DPI, and the number of pixels being trimmed will change). Unfortunately I can't share my data, but here's some code that illustrates the issue. It just draws a black box around Texas: data work.ChoromapData;
infile datalines delimiter=" ";
input x y id $;
datalines;
-94 25 Texas
-94 37 Texas
-106 37 Texas
-106 25 Texas
-94 25 Texas
;
run;
ods listing gpath="/home/my_user/" device=png;
ods graphics on / height=500 width=500 noborder;
proc sgmap mapdata=work.ChoromapData;
openstreetmap;
choromap;
run; The images I get out look like this. I've colored the whitespace around the edge a bright red, so it's easier to see against the forum background, but it's white in my program's output. Normally this would be the region between the map and the thin border that surrounds the whole image (but I've turned the border off with the ods graphics statement). What I want is this (note the lack of whitespace around the edges): I've been trying to get this sorted out for a few days now but have made zero progress. Anyone have any ideas/solutions that maybe I've just not come across yet? Technical details: I'm working in Enterprise Guide 8.3, and SAS version 9.4M7 (full version number: 9.04.01M7P080520).
... View more