Hi ,
Just want know how to anotate graph (insert the text inside the label as per below).
I am using below code.
Thank you,
Rajasekhar
TEXT plot. Add variable with the text and the location you want it to the data set.
Or provide an annotate data set with that.
PLEASE post code in a code box (the running man or </> icon), not as a picture. First, your picture shows "code" that won't run as it clips the semicolon and we can't tell what else might be clipped from the image. Second if we need to suggest a minor change to code we can't copy/paste and edit the code. I am also not likely to retype code from an image.
The simplest way is using INSET statement.
proc sgplot data=sashelp.heart; scatter y=height x=weight/markerattrs=(symbol=circlefilled size=6) transparency=0.85; reg y=height x=weight / lineattrs=(thickness=4 color=red ) nomarkers; yaxis grid label="ylabel"; xaxis label="xlabel"; inset " 70% Subject" /position=west textattrs=(color=red size=20); inset "30% Subject " /position=east textattrs=(color=red size=20); run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.