As a result, SAS is creating the Q1, Q3 and Median values within the statement like a black box. I would like to be able to pump those values out to some external dataset so that someone could verify that what gplot is doing is actually what is expected. This would be a much more accurate way of checking that using the eyeball on the printed graph. Any help would be appreciated. Thanks
If knowing the exact numbers used in the boxplot is important, you might want to try "proc boxplot" (part of SAS/STAT, rather than SAS/GRAPH) - it has an "outbox=" option that will let you create a data set containing the actual numbers.
Yes, I could do that, but I'm sort of back to where I started (having a different proc to give me numbers for QC). I didn't use proc boxplot to begin with because I couldn't see how to get rid of the 'whiskers'. My spec calls for a box plot showing the range (box) between Q1 and Q3 with the median. Hence I went with gplot and the box25 in the symbol statement. Is there a way to get this with boxplot? Thanks
Hmm ... I see 2 other alternatives (there might be other alternatives using GTL or sgplot, etc, that I don't know about).
1 - Use proc boxplot (or other sas analytics procs) to generate a data set containing the values describing the boxplot, and then use annotate to actually draw the boxplot geometry onto an empty gplot set of axes. This would take a bit of work, but it *could* be done this way (I've done something similar in a special dashboard before).
2 - Use dev=activex to draw the SAS/GRAPH gplot bar chart, and then have your QA person view the graph in a browser, and hover their mouse over the boxes to see the actual box values. This is still a bit manual/interactive, but at least you get to see the actual/exact numeric values used in the boxplot (median, low, high, 25th percentile, 75th percentile). Below is some code:
filename odsout '.';
ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm";
Assuming you have SAS 9.2, you can do this using the Graph Template Language. The program below will draw a boxplot without the end caps. I used the ODS OUTPUT statement to generate an output dataset so you can verify the numbers. Let me know if you have any questions.
define statgraph boxplot;
boxplot x=age y=height / display=(fill mean median outliers);