- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can I suppress the mean or median symbol in Proc BoxPlot?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content