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....
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.