I ran into some odd behavior with an annotate data set where I am placing squares as a symbol for one response group. All of the squares are the same color definition but the last one in the group is usually displayed in another color. I have stripped the data and code down to the following example.
When I tried this with different colors in the RECT macro call sometimes all of them seem similar in color but for most the last record in the data shows in a different color that does change depending upon the color specified and sometimes the active ODS style. The example below, running on Windows XP, SAS 9.2 TS Level 1 M0 with the SAS supplied MEADOWS style draws for raspberry colored rectangles and one dark blue (left bottom).
The coordinates used when displayed with my map data using GMAP do draw squares but GANNO below is re-scaling to use the values provided.
My questions are:
Does anyone else see this behavior?
What I am I missing to get all of these the same color.
input X Y ;
retain xsys ysys '2' when 'a';
x1= x-step; x2=x+step;y1=y-step;y2=y+step;
The annomac %RECT is calling for the POLYLINE, which I believe has been replaced with the POLY function. I do not know what the interaction is, but replacing the macro call with its resultant code and replacing POLYLINE with POLY seemed to clear up the problem on my test. the code snippet becomes:
/*IF "H05A66AA" =: '*' THEN ;*/
color = "H05A66AA" ;
LINE = 1;
SIZE = 2;
Another reason I tend to shy away from the %annomac macros.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.