|
Question 1.
How do I create the annotate dataset such that the data values in the 'test'
dataset below will determine the location of a vertical line placed exactly in
the middle of "groupstr" values, and running to the top of the frame, or if
possible running up to meet the frame on the graph? Just code to get a vertical
line in the middle of 'groupstr' values 'c' and 'd' would be fantastic. The
sample code below produces a simple line graph, to help with the answer, I
hope. The vertical axis is "errcnt" values and on the horizontal axis is
"groupstr" values.
data test;
errcnt = 5; groupstr = 'a'; output;
errcnt = 3; groupstr = 'b'; output;
errcnt = 6; groupstr = 'c'; output;
errcnt = 4; groupstr = 'd'; output;
errcnt = 2; groupstr = 'e'; output;
errcnt = 3; groupstr = 'f'; output;
run;
axis1 order=(0 to 7 by 1);
proc gplot data=test;
plot errcnt*groupstr / vaxis=axis1;
symbol1 line=1 value=dot interpol=join;
run;
quit;
Question 2.
Code below produces a simple bar chart. Again on the horizontal axis is the
variable "groupstr". As above I would like to place a line running vertically
in the middle of the "groupstr" value bars "c" and "d". Again the data would
need to drive the location so more data rows or changes in available space do
not prevent correct positioning of the line. The line would run to the top of
the frame in this chart.
The use of %SYSTEM , %LINE macro's etc. in the answer is fine.
proc gchart data=test;
vbar groupstr / type=sum sumvar=errcnt discrete noframe;
run;
quit;
Question 3.
Is it possible to use the annotate facility to place text around the output
from a template containing several graphs? If so how?
I'll need a title and labels on the side.
Thank-you in advance!!
|