Dear all,
I want to define the width of the whisker caps by using CAPSCALE=2 under vbox, but the SAS help said it only applies to SAS 9.4M5 and to later releases. ANyone knows how should I define this in the previous SAS version?
Thank you so much!
Best,
Hua
Did you by any chance try the CAPSHAPE option?
In a quick test at least with the style meadow the cap was considerably wider when using CAPSHAPE=Bracket or CAPSHAPE=Line than the default of serif. In the quick test these two options had the cap as wide as the box.
I suggest upgrading as the amount of work involved might well be quite excessive when modifying such a specific element. The thought that comes to mind is summarizing the data, determining the y values (assuming a vertical box plot) for the end of the whiskers and using an annotate data set with that information to draw lines at the correct points. Which may not apply if you are using the capshape =bracket option.
Which SAS version are you currently using?
It might help someone to show the code you are currently using for the plot, example data in form of a data set wouldn't hurt.
Yes, it would require some effort as outlined by Ballardw, which was the reason for this feature addition. Most users want to reduce the size of the cap. You seem to want to increase it. Can you explain the reason?
Thank you Sanjay! This figure is what I get. You can see that the caps are too tiny and I want to make it more obvious.
Thank you for help, Ballardw. My SAS version is SAS 9.4 TS level 1M4. Since i'm using the computer in the lab, I don't have the permission to make any change to the software.
The following is my code:
proc sgplot data=plot;
vbox value / category=Time group=TreatName nofill
MEANATTRS = (Symbol="CircleFilled" Size=4)
LINEATTRS=(Pattern= 1 )
/*CAPSCALE=2*/
WHISKERATTRS =(Pattern= 1 )
;
keylegend/TITLE="" position=bottom;
yaxis MAX= 0.75 MIN= 0.25 values=(0.25 to 0.75 by 0.05) LABEL="TVDI" ;
xaxis VALUES= ("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec") DISPLAY=(NOLABEL);
refline 0.5 /LINEATTRS= (Pattern= 2);
run;
And a sample data is attached.
Did you by any chance try the CAPSHAPE option?
In a quick test at least with the style meadow the cap was considerably wider when using CAPSHAPE=Bracket or CAPSHAPE=Line than the default of serif. In the quick test these two options had the cap as wide as the box.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.