Data visualization with SAS programming

Annotate and Layout Datapanel

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

Annotate and Layout Datapanel

Hello, this is my first attempt to annotate a graph proceedure.  I am looking to label a individual endpoint.  In the below example I am using "wowididit" but this later would be replaced by the actual value.  I have created the annotation data set.  Then built the template for a Layout Datapanel view with a CLASSVAR (perhaphs this is my issue).  I am receiving no errors, however there also is nothing being annimated on the graphical output.  Any guidance or suggestions would be greatly appreciated.  Thank you.

 

/* make annotation dataset */

DATA SERIESANNO;

LENGTH function style color $8. text $25.;

RETAIN hsys xsys ysys "5";

function="label";

x=10;

y=.60;

position="3";

text="wowididit";

style="calibri";

color="bib";

size=6;

OUTPUT;

RUN;

/* series graph template */

PROC TEMPLATE;

DEFINE STATGRAPH SERIES_PLOT1_1;

BEGINGRAPH /DATACOLORS=(yellow CX000A23 CX0073CF CXE31837 CXD1C9C0 CX00AD50) DATALINEPATTERNS=(4);

ENTRYTITLE TEXTATTRS=(FAMILY="Calibri" SIZE=8pt)'ITP Completed In <= 10 Days' ;

LAYOUT DATAPANEL CLASSVARS=(LOANPURPOSEGROUP) / rowdatarange=unionall ROWS=2

ROWAXISOPTS = (display=(tickvalues)

linearopts=(tickvalueformat=PERCENT7.1)

label=("ITP <= 10 Days") labelattrs=(FAMILY="Calibri" SIZE=8pt))

COLUMNAXISOPTS= (linearopts=(viewmax=10)

label=("Loan Age In Calendar Days") labelattrs=(FAMILY="Calibri" SIZE=8pt));

SIDEBAR;

discretelegend 'series' / TITLEATTRS=(FAMILY="Calibri" SIZE=8pt) ;

ENDSIDEBAR;

 

LAYOUT PROTOTYPE;

SERIESPLOT x=DAY_CT y=ITD_LT10_PCT / GROUP=APPDT_YYYYMM NAME='series' ;

ANNOTATE;

ENDLAYOUT;

 

ENDLAYOUT;

ENDGRAPH;

END;

RUN;

PROC SGRENDER DATA=WORK.CUMM_GRAPH_EXCL_CANC TEMPLATE=SERIES_PLOT1_1 SGANNO=SERIESANNO;

RUN;


Accepted Solutions
Solution
‎05-24-2017 01:49 PM
SAS Super FREQ
Posts: 1,080

Re: Annotate and Layout Datapanel

You cannot use the old style SAS/GRAPH annotation data set with the new SG procedures.  You will need to create a new data set that has the annotation syntax supported by SG procedures.  See doc here.

View solution in original post


All Replies
Solution
‎05-24-2017 01:49 PM
SAS Super FREQ
Posts: 1,080

Re: Annotate and Layout Datapanel

You cannot use the old style SAS/GRAPH annotation data set with the new SG procedures.  You will need to create a new data set that has the annotation syntax supported by SG procedures.  See doc here.

Contributor
Posts: 30

Re: Annotate and Layout Datapanel

Thank you for the guidance.  I am a big fan of your books!  I will read the link.  Again thank you very much.

Contributor
Posts: 30

Re: Annotate and Layout Datapanel

I understand now where I was off.  I was now successful in my attempt.  Again I greatly appreciate the guidance!!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 155 views
  • 1 like
  • 2 in conversation