- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am using the below code to draw a frequency distribution/histogram and getting the graphs as in the attachment. I don't know how I can
remove the "cluster=1" or "1" title above the graphs. I am drawing these graphs per cluster but I don't want that information since I am indicating it in the title.
Thanks,
%macro graphs2(g, p,r,a);
ods graphics / width=400px height=250px;
proc sgpanel data = &g._gr_&a. ;
title "Scale Score: &p &r.";
panelby cluster / columns = 1 rows=1 uniscale = column novarname;
histogram &g._scale_score / transparency=0.25 fillattrs=(color=black) ;
label &g._scale_score= 'Scale Score';
rowaxis label= 'Count';
colaxis values=(910 to 945 by 5) valueshint;
run;
ods graphics / width=400px height=250px;
proc sort data=&g._gr_&a. ;
by cluster;
run;
proc sgplot data=&g._gr_&a. PCTLEVEL=BY;
title "Proficiency Level:&p &r.";
vbar &g._pl / stat=pct transparency=0.25 fillattrs=(color=black) ;
yaxis label= 'Percent' ;
xaxis label= 'Proficiency Level';
by cluster;
run;
%mend;
%graphs2 (listening,List,1-2,1);
- Tags:
- by
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You have two options:
1. Keep the code you have and add the NOHEADER option to the PANELBY statement.
2. Since you're generating one cell per graph, you can use SGPLOT with a BY statement to generate this output instead. SGPLOT has options for creating uniform axes across BY-groups. You would also want to use the statement "OPTIONS NOBYLINE;" (before the procedure) to suppress the BY-line, as you have the information you want in your title.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried
options nobyline;
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You have two options:
1. Keep the code you have and add the NOHEADER option to the PANELBY statement.
2. Since you're generating one cell per graph, you can use SGPLOT with a BY statement to generate this output instead. SGPLOT has options for creating uniform axes across BY-groups. You would also want to use the statement "OPTIONS NOBYLINE;" (before the procedure) to suppress the BY-line, as you have the information you want in your title.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content