Using SAS 9.3 TS Level 1M1 I have created a vbox chart in sgplot where for each year I have a boxplot of the date of conception for a sample of animals. I have set the SAS date to the same year so that I can compare month/day of conception across years. Therefore, I would only like to display day/month, or just the month, on the y axis. Below is as close as I have come. You can see on the y-axis I display month, day, and year but I only want the month displayed (or day and month). Here is the code to generate the graph: proc sgplot data=one noautolegend;
format conc mmddyy8.;
vbox conc / category=year group=agename meanattrs=(symbol=square color=black) whiskerattrs=(color=black) outlierattrs=(color=black)
;
yaxis label='Date of conception' interval=month
VALUES=("01AUG01"d "01SEP01"d "01OCT01"d "01NOV01"d "01DEC01"d "01Jan02"d "01FEB02"d "01MAR02"d)
;* valuesdisplay=("Aug" "Sep" "Oct" "Nov" "Dec" "Jan" "Feb" "Mar");
xaxis label='Year';
run; Note that I have the "valuesdisplay" code commented out because I get an error message otherwise. 1208 valuesdisplay=("Aug" "Sep" "Oct" "Nov" "Dec" "Jan" "Feb" "Mar");
------------- -----
1 22
76
WARNING 1-322: Assuming the symbol VALUES was misspelled as valuesdisplay.
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, (.
ERROR 76-322: Syntax error, statement will be ignored. Is there a date format that will display only the month or month/day. Or is there some other trick with sgplot to do what I want? Thanks! Duane
... View more