06-12-2014 11:31 AM
The title says it all, I'm trying to generate a scatterplot similar what PRISM can do. Has anyone tried to do something similar in SAS?
Trying a categorical x-axis only creates a column of dots with the corresponding values.
proc sgplot data=sashelp.class;
scatter x=sex y = height
I appreciate your feedback.
06-16-2014 03:46 PM
I don't know what PRISM is, but it looks like you have a jittered scatter plot with median and 1st and 3rd quartiles(?). And the markers are assigned attributes by groups. Try this to start. It is from Sanjay's blog post Custom Box Plots - Graphically Speaking This code requires SAS 9.4.
proc means data=sashelp.cars noprint;
median=Median q1=Q1 q3=Q3;
proc sort data=sashelp.cars out=sorted;
/* merge quantiles with sorted data */
set Quantiles sorted;
proc sgplot data=sorted noautolegend;
scatter x=Origin y=mpg_highway / jitter group=Origin;
highlow x=Origin high=q3 low=median / type=bar nofill;
highlow x=Origin high=median low=q1 / type=bar nofill;