BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
3 REPLIES 3
GraphGuy
Meteorite | Level 14
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"(?)
deleted_user
Not applicable
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;
deleted_user
Not applicable
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1334 views
  • 0 likes
  • 2 in conversation