Hi Guys,
I am trying to get a linear graph using proc gplot. It's separated by age group (<80, 80-89 and >=90). When I use ^{UNICODE 2265}90 the plot did not give me a special code">=90" instead it's ^{UNICODE 2265}90 in the graph! I know proc sgplot can deal with this but this code will be buried in a large macro. I need to follow what it used to be--use proc gplot!
Anyone know how to code them?
My code is:
proc format;
value ageold 1="<80"
2="80-89"
3="^{UNICODE 2265}90"
999999="TOTAL"
;
run;
proc gplot data=plot90 ;
format cif percent6. years 3. ageold ageold.;
plot cif * years = ageold / legend=legend1 haxis=axis1 vaxis=axis2 noframe;
run;
quit;
Thanks,
Andrea
"This code is not working. " - Does not tell me anything. It doesn't run? It doesn't affect the output?
I have found this old post which does something quite similar.
It seems to be a bit of a pain, but if you insist on using the old graphing system everything will be painful.
Well to start, you need to tell the system that the escape character is ^:
ods escapechar="^";
Second, why are you using gplot? Move to sgplot and graph template language, they are light years ahead of the ancient graphing system.
Thanks!
ods escapechar="^";
This code is not working.
It's a long story why use gplot instead of sgplot. In a word, the code was originally codes years ago and now we need keep consistent with it.
"This code is not working. " - Does not tell me anything. It doesn't run? It doesn't affect the output?
I have found this old post which does something quite similar.
It seems to be a bit of a pain, but if you insist on using the old graphing system everything will be painful.
Thanks! It IS painful! However, I have to keep it....
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.
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.