In his recent blog article on Drawing Paths on a Map using SGPLOT, Robert Allison showed us visually the path computed by the captain of his return flight from Orlando. As usual, one can rely on Robert to put in visual form some interesting bit of information. Thanks, Robert.
I thought it would be interesting if we could visualize the severe weather together with the path. So, I took the liberty of extending Robert's program by adding the Weather image Robert included. I made everything except the weather part transparent and overlaid the transparent weather image on the SGPLOT map.
I also used the SPLINE statement in place of SERIES as it works well in this case. See the result below.
Putting all the relevant information in one visual conveys more information. The part of code I added is shown below:
/*--Create transparent image annotation data set--*/
length function $10;
function='image'; x1=76; y1=40; height=40; width=35; transparency=0.0;
/*--Run the procedure with SG Annotation--*/
ods graphics on / reset imagename="Map_with_Image" height=6.25in width=8.33in;
title1 ls=0.2 height=22pt c=gray33 'Lat/Long Path on a US Map';
title2 height=12pt c=gray33 "Using Proc SGplot, and overlaid series lines & scatter markers";
proc sgplot data=my_map noborder noautolegend aspect=&aspect sganno=annoImageTrans;
<same as Robert's code>;
In this case I had to manually adjust the location and size of the overlaid image to ensure the storm lines up with the state boundaries as in the original image. I think I am close, but not perfect. It may be close enough to show visually how the Captain threaded the eye of the (storm) needle to get Robert and the rest of the gang back home. It would be nice to come up with a way to register the image annotation directly with the underlying data. Suggestion are welcome.
Full SGPLOT code: Robert_Map_with_SGAnno