05-01-2015 01:46 PM
I am trying to do a simple plot showing the 10th and 90th percentile ranges of grades as well as the labels. Unfortunately, when I run the code the bottom label is not going below the tickmark.
**Setting up the data;
input section $ grade @@;
A 74 A 89 A 91 A 76 A 87 A 93 A 93 A 96 A 55 A 80 A 82
B 72 B 72 B 84 B 81 B 97 B 78 B 88 B 90 B 74 B 80 B 82
C 62 C 74 C 71 C 87 C 68 C 78 C 80 C 85 C 82 C 80 C 82
proc means data=grades noprint;
output out=grades2(drop=_ p10(grade)=p10 p90(grade)=p90;
proc transpose data=grades2 out=grades3(rename=(_name_=type col1=grade));
*Prepare for 3 symbols;
*Symbol1 (p10), symbol2 (p90), symbol3 (connecting p10 and p90 with hilo);
set grades3 grades3(in=inb);
if inb then type='z';
ods rtf file="K:\test.rtf";
symbol1 C=blue I=hilot V=none w=3 pointlabel=(j=c position=bottom f=times);
symbol2 C=blue I=hilot V=none w=3 pointlabel=(j=c position=top f=times);
symbol3 C=blue I=hilot V=none w=.01 pointlabel=none;
proc gplot data=grades4;
ods rtf close;
The resulting output from the rtf is attached. As seen, the p10 labels are not shown below the tickmarks. Very oddly, at some point when I was testing the code the labels were aligned properly, but I am not sure what is causing this. Any help would be appreciated.
05-01-2015 02:54 PM
With SAS 9.2 unable to duplicate this behavior. I get the bottom labels below.
I would try running this code and looking for any additional options in your symbol1 statement.
proc goptions symbol;run;
The log will have the full definition of the symbols. Sometimes other options hang around you don't expect. If you see something you don't expect then try
to clear the full current assignment and then re-run your symbol definitions and the gplot code.
05-01-2015 03:13 PM
I'm running SAS 9.4. This behavior occurs even after I restart SAS. I do have this warning message for some reason which I cannot determine: WARNING: The height specified for the pointlabel might cause the labels to overlap other elements on the graph.
05-01-2015 04:05 PM
I have found that under some conditions some of the graph options will persist across sessions at least with 9.2 and earlier version 9.
Did you try the proc goptions code and look at the symbol definitions?
The warning is possibly related to font size and the default distance from the plot element such as the HILO line or the ends. You may note that your work library has both a GSEG catalog and an RTF catalog with versions of the graph in each. And they may not look alike. See if the text looks like it is overlapping in one (most likely the GSEG).