Data visualization with SAS programming

How to create a layout while hiding previous charts?

Reply
Occasional Contributor
Posts: 7

How to create a layout while hiding previous charts?

Hi All,

I'm working on a stored process that need to display several charts on one page. I'm using the greplay statement to design the layout. But I couldn't find a way to hide the previous charts that I generated. I could either get all the charts shown at the same time or none of them.

My code is as follows:

goptions device=gif goutmode= replace;
ods listing close;
ods graphics on;
Title;
Title1 'XXX';

PROC GCHART DATA =a.dataset gout=b;
PIE seg /
SUMVAR=segcount
TYPE=SUM
NOLEGEND
SLICE=INSIDE
PERCENT=INSIDE
VALUE=NONE
OTHER=4
OTHERLABEL="Other"
COUTLINE=BLACK
DISCRETE
explode=&selseg;
run;

PIE seg /
SUMVAR=tbrseg
TYPE=SUM
NOLEGEND
SLICE=INSIDE
PERCENT=INSIDE
VALUE=NONE
OTHER=4
OTHERLABEL="Other"
COUTLINE=BLACK
DISCRETE
explode=&selseg;
run;quit;

goption goutmode = append;

ods listing;

proc greplay igout=b gout=c
tc=tempcat nofs;
template=grftmplt;
tdef grftmplt

1/llx=20 lly=50
ulx=20 uly=90
urx=60 ury=90
lrx=60 lry=50


2/llx=40 lly=50
ulx=40 uly=90
urx=80 ury=90
lrx=80 lry=50
;

template grftmplt;

list template;

treplay 1:gchart
2:gchart1
;
quit;

I'm using the ods listing to hide the charts, but by doing that I couldn't get the charts in gout as well. Anyone knows how to hide the previous graph and only display the page after layout design?
Super Contributor
Posts: 273

Re: How to create a layout while hiding previous charts?

Alternate
goptions nodisplay ; .....
goptions display;
proc greplay...

but i have no experience of stored process

Andre Message was edited by: Andre
Occasional Contributor
Posts: 7

Re: How to create a layout while hiding previous charts?

It works, thank you so much!
Ask a Question
Discussion stats
  • 2 replies
  • 162 views
  • 0 likes
  • 2 in conversation