BookmarkSubscribeRSS Feed
ykjohn
Calcite | Level 5

Graph BGraph BGraph AGraph A

Hi Everyone, 

I want to create a CIF graph with an enlarged y-axis as shown in the inset apixaban-warfarin graph. 

The code below produced the second CIF graph  attached. How do create an inset graph with an enlarged y-axis or create just a single graph with an enlarged yaxis. Thanks.  

PROC LIFETEST DATA=SOURCE.BIGDATA OUTCIF=ATRISK MAXTIME=14 plots=cif(test);
TIME PERIOD * EVENTCLASS(0)/EVENTCODE=1;
STRATA CLASS; 
ODS OUTPUT CIF=CIFDATA;
RUN;

 

4 REPLIES 4
Reeza
Super User
You've posted in SAS VA. Are you using Visual Analytics or Studio?
ykjohn
Calcite | Level 5

I use SAS enterprise 9.4. Do I need to repost to another forum? 

 

Reeza
Super User
Assuming you're using Enterprise Guide, I've moved it for you.
Ksharp
Super User

https://blogs.sas.com/content/graphicallyspeaking/2017/09/18/advanced-ods-graphics-inserting-graph-g...
https://blogs.sas.com/content/graphicallyspeaking/2012/01/26/nested-graphs/

 

Here is an example:

ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='regression' ;
/*produce a inset/nested graph*/
proc sgplot data=sashelp.class  noautolegend;
reg x=weight y=height/clm;
xaxis display=none;
yaxis display=none;
run;


%sganno
data sganno;
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\regression1.png",ANCHOR="topleft",BORDER="TRUE",DRAWSPACE="wallpercent" ,width=40,x1=1,y1=99)
run;
/*plot inset graph*/
proc sgplot data=sashelp.class sganno=sganno noautolegend;
   scatter y=weight x=height / group=sex datalabel=name;
run;

Ksharp_0-1675770021677.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1662 views
  • 0 likes
  • 3 in conversation