Data visualization with SAS programming

change multiple group series plot line thickness and output to rtf

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

change multiple group series plot line thickness and output to rtf

Hi,everyone,

I want to draw a series plot for multiple groups.

I want to use self-defined values of line thickness for each group and output the results to a rtf file.

I wrote a sample code with sas built-in dataset  "Stock" as follows

proc template;
define statgraph Graph;
dynamic _DATE _CLOSE _STOCK;
begingraph;
   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
      layout overlay;
         seriesplot x=_DATE y=_CLOSE / group=_STOCK name='series' connectorder=xaxis lineattrs=(thickness=5 );
      endlayout;
   endlayout;
endgraph;
end;
run;
ODS RTF FILE="C:\Users\SAS_Fun\Desktop\test.rtf" ;

proc sgrender data=WORK.STOCKS template=Graph;
dynamic _DATE="DATE" _CLOSE="CLOSE" _STOCK="STOCK";
run;
ODS RTF CLOSE;

 

In the SAS viewer,it showed like this:

 Capture.PNG

However,in the rtf file,it showed as follows

Capture1.PNG

Would you please help me with that,thank you so much!


Accepted Solutions
Solution
‎11-01-2016 10:40 AM
SAS Super FREQ
Posts: 1,139

Re: change multiple group series plot line thickness and output to rtf

Try setting  ODS GRAPHICS option ATTRPRIORITY=COLOR to get all solid lines with 3 colors.  

What is the SAS release you are using?  Maybe the output is scalable (EMF) and not working well.  You can try setting OUTPUTFMT=PNG to see if that works better.

View solution in original post


All Replies
Solution
‎11-01-2016 10:40 AM
SAS Super FREQ
Posts: 1,139

Re: change multiple group series plot line thickness and output to rtf

Try setting  ODS GRAPHICS option ATTRPRIORITY=COLOR to get all solid lines with 3 colors.  

What is the SAS release you are using?  Maybe the output is scalable (EMF) and not working well.  You can try setting OUTPUTFMT=PNG to see if that works better.

Contributor
Posts: 21

Re: change multiple group series plot line thickness and output to rtf

Thank you so much,Sanjay!

It works very well,thank you again!

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 275 views
  • 1 like
  • 2 in conversation