I am trying to use Annotate and Proc Gplot to combine / annotate with the time of day (within same 24 hour period) on the xaxis. If I plot my data using Gplot, no problem. If I try to bring it in with my x set to time of day I get the error:
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
which says my data is too big. However, it is time of day formated as time of day. If I do a gplot it plots just fine. I have played with different xyxs values with no change. Any thoughts?
thanks,
205 data anno ;
206 length function color $ 8 ;
207 format x tod5. ;
208 retain xyxs ysys '3' size 2 ;
209 set temp ; * Tracker data for one Barlogie day as a test ;
210 ID = _n_ ;
211 function = 'move' ; x='09:00'T ; *x = arrivetime ; y = _n_ ; output ;
212 function = 'draw' ; x='10:00'T ; *x = leavetime ; y = _n_ ; color= 'red' ; size= 3 ; output ;
213 Run ;
NOTE: There were 15 observations read from the data set WORK.TEMP.
NOTE: The data set WORK.ANNO has 30 observations and 28 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
214 Axis1 order = ('08:00'T to '20:00'T by '00:30'T) minor = none label = (f = 'arial' h = 2 'Start to Stop');
215 Axis2 order = (0 to 10) minor = none;
216 symbol1 interpol=join value=dot;
217 *symbol i = none;
218 proc gplot data=anno ;
219 plot id*arrivetime / haxis = axis1 annotate = anno ; * vaxis = axis2;
220 run;
NOTE: ERROR DETECTED IN ANNOTATE= DATASET WORK.ANNO.
NOTE: PROBLEM IN OBSERVATION 1 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 2 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 3 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 4 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 5 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 6 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 7 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 8 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 9 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 10 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 11 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 12 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 13 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 14 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 15 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 16 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 17 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 18 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 19 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: PROBLEM IN OBSERVATION 20 -
A CALCULATED COORDINATE LIES OUTSIDE THE VISIBLE AREA X
NOTE: ERROR LIMIT REACHED IN ANNOTATE PROCESS. PROCESSING IS TERMINATED.
NOTE: 20 TOTAL ERRORS.
221 quit;
NOTE: There were 30 observations read from the data set WORK.ANNO.
NOTE: There were 20 observations read from the data set WORK.ANNO.
NOTE: PROCEDURE GPLOT used (Total process time):
real time 0.17 seconds
cpu time 0.15 seconds
I notice you probably have an error in your retain statement -- rather than xyxs, you probably intended it to be xsys:
retain xyxs ysys '3' size 2 ;
Also, when annotating values based on the data's coordinate system, you probably want to use xsys and ysys of '2'.
I notice you probably have an error in your retain statement -- rather than xyxs, you probably intended it to be xsys:
retain xyxs ysys '3' size 2 ;
Also, when annotating values based on the data's coordinate system, you probably want to use xsys and ysys of '2'.
Thank you very much. One of those obvious, slap myself
silly things. Been working with SAS since 1977, then get hung on something simple like this. I have fought this for 3 days.
I would never admit publicly that I've done something similar...
But I've probably done something similar! 😉
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.