BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
xxz3231
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

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

2 REPLIES 2
Jay54
Meteorite | Level 14

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.

xxz3231
Calcite | Level 5

Thank you so much,Sanjay!

It works very well,thank you again!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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