Data visualization with SAS programming

remove the border of a graph generated by proc greplay

Accepted Solution Solved
Reply
Contributor
Posts: 44
Accepted Solution

remove the border of a graph generated by proc greplay

Here is my code to generate a graph without border using proc greplay. I did specify the goption noborder options. It did not work.

%macro delcat(catname);

%if %sysfunc(cexist(&catname))

%then %do;

proc greplay nofs igout=&catname;

delete _all_;

run;

quit;

%end;

%mend delcat;

%delcat(work.gseg)

axis1 order=(-0.1 to 0.20 by 0.05)  label=(justify=c angle=90 "Correlation")    minor=(n=3);

axis2 order=(0 to 500 by 50) label=(justify=r "Lags") major=(n=5);

symbol1 interpol=join color=black value=none;

symbol2 interpol=join color=black line=20 value=none;

proc gplot data=arima;

plot corr*lag stderr*lag/overlay vaxis=axis1 haxis=axis2;

title 'Correlogram of squared raw 10-min returns';

footnote;

run;

proc gplot data=arima1;

plot corr*lag stderr*lag/overlay vaxis=axis1 haxis=axis2;

title 'Correlogram of deseasonal squared 10-min returns';

*footnote 'Dashed lines represent 2 times of standard errors of autocorrelations';

footnote;

run;

goption reset=all xmax=15cm ymax=15cm noborder;

ods html gpath="C:\" image_dpi=200;

proc greplay igout=work.gseg  tc=sashelp.templt nofs;

template v2;

treplay 1:gplot

        2:gplot1;

  quit;


Accepted Solutions
Solution
‎03-06-2014 12:02 PM
SAS Employee
Posts: 967

Re: remove the border of a graph generated by proc greplay

In this situation, the border you are seeing around the graphs is probably coming from the greplay template itself (rather than goptions border). When a greplay template is defined/created, if you specify a 'color=' then that color will be used as a visible border around the graph. You are using the pre-defined "V2" template, and I believe it is created with color=black (so the graphs have a black border drawn around them).

Here is the code used to create the V2 template - you could modify this code to create your own custom template, and leave out the 'color=black' to leave out the borders:

SAS/GRAPH(R) 9.2: Reference, Second Edition

proc greplay tc=tempcat nofs;

   tdef V2 des= "1 BOX UP, 1 BOX DOWN"

        1/llx=0   lly=50

          ulx=0   uly=100

          urx=100  ury=100

          lrx=100  lry=50

          color=black

        2/llx=00  lly=00

          ulx=00  uly=50

          urx=100 ury=50

          lrx=100 lry=0

          color=black;

quit;

View solution in original post


All Replies
Solution
‎03-06-2014 12:02 PM
SAS Employee
Posts: 967

Re: remove the border of a graph generated by proc greplay

In this situation, the border you are seeing around the graphs is probably coming from the greplay template itself (rather than goptions border). When a greplay template is defined/created, if you specify a 'color=' then that color will be used as a visible border around the graph. You are using the pre-defined "V2" template, and I believe it is created with color=black (so the graphs have a black border drawn around them).

Here is the code used to create the V2 template - you could modify this code to create your own custom template, and leave out the 'color=black' to leave out the borders:

SAS/GRAPH(R) 9.2: Reference, Second Edition

proc greplay tc=tempcat nofs;

   tdef V2 des= "1 BOX UP, 1 BOX DOWN"

        1/llx=0   lly=50

          ulx=0   uly=100

          urx=100  ury=100

          lrx=100  lry=50

          color=black

        2/llx=00  lly=00

          ulx=00  uly=50

          urx=100 ury=50

          lrx=100 lry=0

          color=black;

quit;

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 908 views
  • 0 likes
  • 2 in conversation