🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 01-28-2021 01:35 AM
(1957 views)
Dear all.
I created the plot in the attachement, using Vbox in SGPLOT.
I would like to include the frequencies for each point of NACCFDYSYear somewhere in the plot.
The XAXISTABLE statement cannot produce frequencies with box plots.
Any suggestions?
Thanks
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You want this ?
proc sql;
create table have as
select sex,status,weight,count(*) as count,max(weight)+.05*range(weight) as y
from sashelp.heart
group by sex,status;
quit;
data have ;
set have;
by sex status;
if not first.status then call missing(count,y);
run;
proc sgplot data=have;
vbox weight/category=sex group=status groupdisplay=cluster connect=median;
scatter x=sex y=y/group=status markerchar=count groupdisplay=cluster labelstrip clusterwidth=0.7;
run;
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Show us your code 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Code attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You want this ?
proc sql;
create table have as
select sex,status,weight,count(*) as count,max(weight)+.05*range(weight) as y
from sashelp.heart
group by sex,status;
quit;
data have ;
set have;
by sex status;
if not first.status then call missing(count,y);
run;
proc sgplot data=have;
vbox weight/category=sex group=status groupdisplay=cluster connect=median;
scatter x=sex y=y/group=status markerchar=count groupdisplay=cluster labelstrip clusterwidth=0.7;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ksharp