BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
desireatem
Pyrite | Level 9

When I plot thes plots, the name on the plot suppose to be " Plot _SENSIT_A      _SENSIT_B" however I am getting " Plot sensitivity      _SENSIT_B.

How do I correct it?

GOPTIONS reset=all cback=white border;

DATA new;

INPUT _SENSIT_A _SENSIT_B SPEC ;

_1MSPEC_ =1-SPEC;

CARDS;

1 1 0

.98 .95 0.1

.97  .91  .2

.95 .88 .3

.87  .70 .5

.70  .4 .7

.55 .30 .8

.1 0.1 1

;

DATA anno;

FUNCTION='move'; xsys='1'; ysys='1'; x=0; y=0; OUTPUT;

FUNCTION='draw'; xsys='1'; ysys='1'; color='red'; x=100; y=100; OUTPUT;

RUN;

PROC GPLOT data=new;

proc gplot data=new;

   plot _SENSIT_A*_1MSPEC_  _SENSIT_B*_1MSPEC_ / overlay legend=legend1

                             vref=0 to 1 by .1

                             lvref=2

                             haxis=axis1 hminor=1

                             vaxis=axis2 vminor=2;

symbol2 i=join v=dot c=red line=2;

SYMBOL1 i=j v=dot c=black;

AXIS1 length=5 in;

AXIS2 length=5 in;

LABEL _SENSIT_A ='Sensitivity';

LABEL _1MSPEC_='1 - Specificity';

run;ke on the plote

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You used the LABEL statment to add a label for the _SENSIT_A variable, so that label is being used for the legend.  You should post questions like this to the SAS/GRAPH Support Community: https://communities.sas.com/community/support-communities/sas_graph_and_ods_graphics

If you are interested in learning the modern ODS statistical graphics, here is how to create the plot with PROC SGPLOT:

title "Comparison of Models A and B";

PROC SGPLOT data=new;

label _SENSIT_A="A" _SENSIT_B="B";

series x=_1MSPEC_ y=_SENSIT_A / markers;

series x=_1MSPEC_ y=_SENSIT_B / markers;

xaxis label = '1 - Specificity';

yaxis label = 'Sensitivity' grid;

run;

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

You used the LABEL statment to add a label for the _SENSIT_A variable, so that label is being used for the legend.  You should post questions like this to the SAS/GRAPH Support Community: https://communities.sas.com/community/support-communities/sas_graph_and_ods_graphics

If you are interested in learning the modern ODS statistical graphics, here is how to create the plot with PROC SGPLOT:

title "Comparison of Models A and B";

PROC SGPLOT data=new;

label _SENSIT_A="A" _SENSIT_B="B";

series x=_1MSPEC_ y=_SENSIT_A / markers;

series x=_1MSPEC_ y=_SENSIT_B / markers;

xaxis label = '1 - Specificity';

yaxis label = 'Sensitivity' grid;

run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 653 views
  • 0 likes
  • 2 in conversation