Hi, I have two variables I'd like to plot out using a scatter plot. I'd also like to add onto that same plot a line at a 45 degree angle. What is the best way to go about doing this? Thanks!
proc sgplot data=sashelp.class aspect=1;
scatter x=weight y=height/group=sex;
lineparm x=0 y=0 slope=1;
View solution in original post
This shows one way to generate the line over a scatter plot. Add a second scatter plot statement for the second variable.
Making a Scatterplot with a 45 degree line
Add a 45-degree reference line to PROC GPLOT output
Need further help from the community? Please
ask a new question.