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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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