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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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