Maybe a trivial question, but how can I make the graphs (scatterplots) generated from SGPlot to show the BY variables as the graph title and not "Variables ordered by Q3"? This came about after I used PROC Transpose to change my data from wide to long format and after which I sorted the response variable according to a categorical grouping with PROC Sort.
I can't find anything on this in the documentation or on the web and I'm getting desperate 😞
Thanks.
Your question isn't clear to me, but at a guess:
proc sgplot ...;
by avariable;
title "The by variable value here is #byvar1"; /* Note you can also use #byval1 */
scatter x=... y=...;
run;
http://www2.sas.com/proceedings/sugi23/Coders/p75.pdf
Your question isn't clear to me, but at a guess:
proc sgplot ...;
by avariable;
title "The by variable value here is #byvar1"; /* Note you can also use #byval1 */
scatter x=... y=...;
run;
http://www2.sas.com/proceedings/sugi23/Coders/p75.pdf
Another guess: when you use PROC TRANSPOSE, the new variables are given a default label. If you don't like the label on the axes, you can use the XAXIS and YAXIS statements to change them:
proc sgplot;
scatter x=x y=y;
xaxis label="My X label";
yaxis label="My Y label";
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.