Data visualization with SAS programming

Annotate Text Problem

Reply
N/A
Posts: 0

Annotate Text Problem

Both the text from "trim(left(avg_emp))" and "correlation: &rate1" appear in the gplot.
However, the text from "trim(left(avg_emp))" is very small.
How can I fix the font size of "trim(left(avg_emp))"?

proc corr data=wes5 PEARSON noprint outp=newp;
var rate1 pf2;
where item2=&qn;
run;

data _null_;
set newp;
if _NAME_="pf2" then call symput('rate1',trim(left(rate1)));
run;
%put ########## rate1=&rate1;

data anno1;
set wes5 end=last;
length function color $8 style $20 text $20;
retain xsys ysys '2' hsys '3' when 'b';
x=pf2;
y=rate1;
function='label';
x=pf2;
y=rate1;
size=3.5;
color='black';
text=trim(left(avg_emp));
x=75;y=16;
size=3;
text="correlation: &rate1";
output;
run;

goptions device=ACTIVEX;
proc gplot data=wes5 anno=anno1;
SAS Employee
Posts: 990

Re: Annotate Text Problem

Posted in reply to deleted_user
Just glancing at the code you use to create your annotate data set, it looks like you're using the correct things to control the annotated text size ...

hsys='3'; says that the number specified in the 'size' variable is % of screen
size=3 and size=3.5 seem "reasonable" numbers.

So, does the size= have no effect on the graph, if you change it?

Try this with dev=gif ... perhaps this is one of the things that dev=activex only "partially supports"(?)
N/A
Posts: 0

Re: Annotate Text Problem

Posted in reply to RobertAllison_SAS
I found the problem.
For whatever reason this didn't work the first time I tried it.

function='label';
x=pf2;
y=rate1;
size=3.5;
color='black';
text=trim(left(avg_emp));
output;
function='label';
x=75;y=16;
size=3;
text="correlation: &rate1";
output;
N/A
Posts: 0

Re: Annotate Text Problem

Posted in reply to RobertAllison_SAS
Do you know how to make the dots on my graph go away?
They're located in the middle of each value from avg_emp (outputted from text in annotate output).

symbol i=none v=dot;
symbol2 i=none v=dot c='CXD9576E' h=0;
symbol3 i=none v=dot c='CXBFBFBF' h=0;
SYMBOL1 i=none v=dot h=0.01 c='blue' I=r;
proc gplot data=wes5 anno=anno1;
plot rate1*pf2/ noframe nolegend haxis=axis1 vaxis=axis2 href=&vline
Ask a Question
Discussion stats
  • 3 replies
  • 177 views
  • 0 likes
  • 2 in conversation