Hi all,
I want to have a boxplot figure below, in the topleft area (mean area) I want to add some results analysized by myself, for example, I want to add "E1 vs E2 E2 VS E3" in the rectangle (mean area). I tried to use inset statement in the proc boxplot, but shows syntax error.
Any idea?
Thanks
Show your code and log
Hi,
I know my code is wrong. I was wondering if there is a way to add some text in the figure?
1893 proc boxplot data=box;
1894 plot lin_*group /
1895 nohlabel;
1896 label lin_ = 'No. of Lin+';
1897 inset P-Value / height=5 cfill=blank header='' pos=nw;
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: DATA, MAX, MEAN, MIN, NMAX, NMIN, NOBS, STDDEV.
ERROR 76-322: Syntax error, statement will be ignored.
1898 run;
Thanks,
Chen
you should try the data option in the inset statement as below, in the position option in place of the x and y coordinates. Please specify the x and y axis where you want to have the box positioned.
also p-value is not a variable name, could you please check the p-value variable name and mention the same in place of p-value.
plot lin_*group /
nohlabel;
label lin_ = 'No. of Lin+';
inset P-Value / height=5 cfill=blank header='E1 vs E2 E2 VS E3' position=(x,y) data;
quit;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.