Can I suppress the mean or median symbol in Proc BoxPlot?
@Batman wrote:
Can I suppress the mean or median symbol in Proc BoxPlot?
Time to move to Prog SGPLOT and the VBOX or HBOX plot. That allows suppressing either or both with the NOMEAN and NOMEDIAN option.
@Batman wrote:
Can I suppress the mean or median symbol in Proc BoxPlot?
Time to move to Prog SGPLOT and the VBOX or HBOX plot. That allows suppressing either or both with the NOMEAN and NOMEDIAN option.
@Batman wrote:
Yes, SGPLOT does allow me to suppress the mean. Is there away to label the symbols on the chart, so the reader can know the "I" stands for the median?
Since "I" is not a default associated with medians you may have to share some of your code.
One of the very nice features of the newer SGPLOT over the older procedures Gplot/Gchart/Boxplot is the ability to, within some limits, overlay multiple plots. And one of those is designed to place text at graph positions. The trick may be getting the coordinates for something like a summary value like mean or median, not really difficult, and then combining with the data to plot. A brief example that shows the word "Median" in place of the bar in a vertical box plot.
proc summary data=sashelp.class nway; class sex; var height; output out=work.summary (drop=_:) mean= median=/autoname; run; data work.plot; set sashelp.class work.summary ; if height_median ne . then medtxt = 'Median'; run; proc sgplot data=work.plot; vbox height /category=sex nomedian; text x=sex y=height_median text=medtxt; run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.